some changes
This commit is contained in:
parent
2f05e9421d
commit
d4f511d8ce
|
@ -15,9 +15,9 @@ naughty.config.defaults.ontop = true
|
||||||
naughty.config.defaults.icon_size = dpi(32)
|
naughty.config.defaults.icon_size = dpi(32)
|
||||||
naughty.config.defaults.timeout = 5
|
naughty.config.defaults.timeout = 5
|
||||||
naughty.config.defaults.title = 'System Notification'
|
naughty.config.defaults.title = 'System Notification'
|
||||||
naughty.config.defaults.margin = dpi(16)
|
naughty.config.defaults.margin = dpi(20)
|
||||||
naughty.config.defaults.border_width = 0
|
naughty.config.defaults.border_width = 0
|
||||||
naughty.config.defaults.position = 'top_right'
|
naughty.config.defaults.position = 'bottom_middle'
|
||||||
naughty.config.defaults.shape = function(cr, w, h) gears.shape.rounded_rect(cr, w, h, dpi(6)) end
|
naughty.config.defaults.shape = function(cr, w, h) gears.shape.rounded_rect(cr, w, h, dpi(6)) end
|
||||||
|
|
||||||
-- Apply theme variables
|
-- Apply theme variables
|
||||||
|
@ -44,11 +44,11 @@ ruled.notification.connect_signal('request::rules', function()
|
||||||
ruled.notification.append_rule {
|
ruled.notification.append_rule {
|
||||||
rule = { urgency = 'critical' },
|
rule = { urgency = 'critical' },
|
||||||
properties = {
|
properties = {
|
||||||
font = 'SF Pro Text Bold 10',
|
font = 'VictorMono Nerd Font 10',
|
||||||
bg = '#ff0000',
|
bg = '#ff0000',
|
||||||
fg = '#ffffff',
|
fg = '#ffffff',
|
||||||
margin = dpi(16),
|
margin = dpi(16),
|
||||||
position = 'top_right',
|
position = 'bottom_middle',
|
||||||
implicit_timeout = 0
|
implicit_timeout = 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -57,11 +57,11 @@ ruled.notification.connect_signal('request::rules', function()
|
||||||
ruled.notification.append_rule {
|
ruled.notification.append_rule {
|
||||||
rule = { urgency = 'normal' },
|
rule = { urgency = 'normal' },
|
||||||
properties = {
|
properties = {
|
||||||
font = 'SF Pro Text Regular 10',
|
font = 'VictorMono Nerd Font 10',
|
||||||
bg = beautiful.transparent,
|
bg = beautiful.transparent,
|
||||||
fg = beautiful.fg_normal,
|
fg = beautiful.fg_normal,
|
||||||
margin = dpi(16),
|
margin = dpi(16),
|
||||||
position = 'top_right',
|
position = 'bottom_middle',
|
||||||
implicit_timeout = 5
|
implicit_timeout = 5
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -70,11 +70,11 @@ ruled.notification.connect_signal('request::rules', function()
|
||||||
ruled.notification.append_rule {
|
ruled.notification.append_rule {
|
||||||
rule = { urgency = 'low' },
|
rule = { urgency = 'low' },
|
||||||
properties = {
|
properties = {
|
||||||
font = 'SF Pro Text Regular 10',
|
font = 'VictorMono Nerd Font 10',
|
||||||
bg = beautiful.transparent,
|
bg = beautiful.transparent,
|
||||||
fg = beautiful.fg_normal,
|
fg = beautiful.fg_normal,
|
||||||
margin = dpi(16),
|
margin = dpi(16),
|
||||||
position = 'top_right',
|
position = 'bottom_middle',
|
||||||
implicit_timeout = 5
|
implicit_timeout = 5
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -117,7 +117,7 @@ naughty.connect_signal("request::display", function(n)
|
||||||
local actions_template = wibox.widget {
|
local actions_template = wibox.widget {
|
||||||
notification = n,
|
notification = n,
|
||||||
base_layout = wibox.widget {
|
base_layout = wibox.widget {
|
||||||
spacing = dpi(0),
|
spacing = dpi(4),
|
||||||
layout = wibox.layout.flex.horizontal
|
layout = wibox.layout.flex.horizontal
|
||||||
},
|
},
|
||||||
widget_template = {
|
widget_template = {
|
||||||
|
@ -126,7 +126,7 @@ naughty.connect_signal("request::display", function(n)
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
id = 'text_role',
|
id = 'text_role',
|
||||||
font = 'SF Pro Text Regular 10',
|
font = 'VictorMono Nerd Font 10',
|
||||||
widget = wibox.widget.textbox
|
widget = wibox.widget.textbox
|
||||||
},
|
},
|
||||||
widget = wibox.container.place
|
widget = wibox.container.place
|
||||||
|
@ -135,10 +135,10 @@ naughty.connect_signal("request::display", function(n)
|
||||||
},
|
},
|
||||||
bg = beautiful.groups_bg,
|
bg = beautiful.groups_bg,
|
||||||
shape = gears.shape.rounded_rect,
|
shape = gears.shape.rounded_rect,
|
||||||
forced_height = dpi(30),
|
forced_height = dpi(35),
|
||||||
widget = wibox.container.background
|
widget = wibox.container.background
|
||||||
},
|
},
|
||||||
margins = dpi(4),
|
margins = dpi(8),
|
||||||
widget = wibox.container.margin
|
widget = wibox.container.margin
|
||||||
},
|
},
|
||||||
style = { underline_normal = false, underline_selected = true },
|
style = { underline_normal = false, underline_selected = true },
|
||||||
|
@ -164,7 +164,7 @@ naughty.connect_signal("request::display", function(n)
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
markup = n.app_name or 'System Notification',
|
markup = n.app_name or 'System Notification',
|
||||||
font = 'SF Pro Text Bold 10',
|
font = 'VictorMono Nerd Font 10',
|
||||||
align = 'center',
|
align = 'center',
|
||||||
valign = 'center',
|
valign = 'center',
|
||||||
widget = wibox.widget.textbox
|
widget = wibox.widget.textbox
|
||||||
|
@ -217,7 +217,7 @@ naughty.connect_signal("request::display", function(n)
|
||||||
margins = dpi(0),
|
margins = dpi(0),
|
||||||
widget = wibox.container.margin,
|
widget = wibox.container.margin,
|
||||||
},
|
},
|
||||||
bg = beautiful.transparent,
|
bg = beautiful.bg_normal,
|
||||||
widget = wibox.container.background,
|
widget = wibox.container.background,
|
||||||
},
|
},
|
||||||
-- Notification action list
|
-- Notification action list
|
||||||
|
@ -226,7 +226,7 @@ naughty.connect_signal("request::display", function(n)
|
||||||
spacing = dpi(4),
|
spacing = dpi(4),
|
||||||
layout = wibox.layout.fixed.vertical,
|
layout = wibox.layout.fixed.vertical,
|
||||||
},
|
},
|
||||||
bg = beautiful.transparent,
|
bg = beautiful.bg_normal,
|
||||||
id = "background_role",
|
id = "background_role",
|
||||||
widget = naughty.container.background,
|
widget = naughty.container.background,
|
||||||
},
|
},
|
||||||
|
@ -240,13 +240,17 @@ naughty.connect_signal("request::display", function(n)
|
||||||
},
|
},
|
||||||
-- Anti-aliasing container
|
-- Anti-aliasing container
|
||||||
-- Real BG
|
-- Real BG
|
||||||
bg = beautiful.background,
|
bg = beautiful.bg_normal,
|
||||||
-- This will be the anti-aliased shape of the notification
|
-- This will be the anti-aliased shape of the notification
|
||||||
shape = gears.shape.rounded_rect,
|
shape = gears.shape.rounded_rect,
|
||||||
widget = wibox.container.background
|
widget = wibox.container.background
|
||||||
},
|
},
|
||||||
-- Margin of the fake BG to have a space between notification and the screen edge
|
-- Margin of the fake BG to have a space between notification and the screen edge
|
||||||
margins = dpi(5),--beautiful.notification_margin,
|
-- margins = dpi(15),--beautiful.notification_margin,
|
||||||
|
right = dpi(20),
|
||||||
|
left = dpi(20),
|
||||||
|
bottom = dpi(20),
|
||||||
|
top = dpi(5),
|
||||||
widget = wibox.container.margin
|
widget = wibox.container.margin
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,30 +51,30 @@ require('module.dynamic-wallpaper')
|
||||||
-- require('module.lockscreen')
|
-- require('module.lockscreen')
|
||||||
|
|
||||||
|
|
||||||
-- {{{ Error handling
|
-- -- {{{ Error handling
|
||||||
-- Check if awesome encountered an error during startup and fell back to
|
-- -- Check if awesome encountered an error during startup and fell back to
|
||||||
-- another config (This code will only ever execute for the fallback config)
|
-- -- another config (This code will only ever execute for the fallback config)
|
||||||
if awesome.startup_errors then
|
-- if awesome.startup_errors then
|
||||||
naughty.notify({ preset = naughty.config.presets.critical,
|
-- naughty.notify({ preset = naughty.config.presets.critical,
|
||||||
title = "Oops, there were errors during startup!",
|
-- title = "Oops, there were errors during startup!",
|
||||||
text = awesome.startup_errors })
|
-- text = awesome.startup_errors })
|
||||||
end
|
-- end
|
||||||
|
|
||||||
-- Handle runtime errors after startup
|
-- -- Handle runtime errors after startup
|
||||||
do
|
-- do
|
||||||
local in_error = false
|
-- local in_error = false
|
||||||
awesome.connect_signal("debug::error", function (err)
|
-- awesome.connect_signal("debug::error", function (err)
|
||||||
-- Make sure we don't go into an endless error loop
|
-- -- Make sure we don't go into an endless error loop
|
||||||
if in_error then return end
|
-- if in_error then return end
|
||||||
in_error = true
|
-- in_error = true
|
||||||
|
|
||||||
naughty.notify({ preset = naughty.config.presets.critical,
|
-- naughty.notify({ preset = naughty.config.presets.critical,
|
||||||
title = "Oops, an error happened!",
|
-- title = "Oops, an error happened!",
|
||||||
text = tostring(err) })
|
-- text = tostring(err) })
|
||||||
in_error = false
|
-- in_error = false
|
||||||
end)
|
-- end)
|
||||||
end
|
-- end
|
||||||
-- }}}
|
-- -- }}}
|
||||||
|
|
||||||
-- {{{ Variable definitions
|
-- {{{ Variable definitions
|
||||||
-- Themes define colours, icons, font and wallpapers.
|
-- Themes define colours, icons, font and wallpapers.
|
||||||
|
|
Loading…
Reference in a new issue