themes: Add `ruled.notification` to all themes.
The rational behind this is that adding more and more `beautiful` variables doesn't scale. While not everybody is on board with this, I think we should move more logic into the theme to put an end to the unscalable complexity plagging some modules (such as the tasklist). Instead of adding a variable for the background and foreground color of urgent notification, we can now use the rules.
This commit is contained in:
parent
05ba03538f
commit
c6f617ab98
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
local theme_assets = require("beautiful.theme_assets")
|
local theme_assets = require("beautiful.theme_assets")
|
||||||
local xresources = require("beautiful.xresources")
|
local xresources = require("beautiful.xresources")
|
||||||
|
local rnotification = require("ruled.notification")
|
||||||
local dpi = xresources.apply_dpi
|
local dpi = xresources.apply_dpi
|
||||||
|
|
||||||
local gfs = require("gears.filesystem")
|
local gfs = require("gears.filesystem")
|
||||||
|
@ -126,6 +127,14 @@ theme.awesome_icon = theme_assets.awesome_icon(
|
||||||
-- from /usr/share/icons and /usr/share/icons/hicolor will be used.
|
-- from /usr/share/icons and /usr/share/icons/hicolor will be used.
|
||||||
theme.icon_theme = nil
|
theme.icon_theme = nil
|
||||||
|
|
||||||
|
-- Set different colors for urgent notifications.
|
||||||
|
rnotification.connect_signal('request::rules', function()
|
||||||
|
rnotification.append_rule {
|
||||||
|
rule = { urgency = 'critical' },
|
||||||
|
properties = { bg = '#ff0000', fg = '#ffffff' }
|
||||||
|
}
|
||||||
|
end)
|
||||||
|
|
||||||
return theme
|
return theme
|
||||||
|
|
||||||
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
|
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
|
|
||||||
local theme_assets = require("beautiful.theme_assets")
|
local theme_assets = require("beautiful.theme_assets")
|
||||||
local dpi = require("beautiful.xresources").apply_dpi
|
local dpi = require("beautiful.xresources").apply_dpi
|
||||||
|
local rnotification = require("ruled.notification")
|
||||||
local gfs = require("gears.filesystem")
|
local gfs = require("gears.filesystem")
|
||||||
local themes_path = gfs.get_themes_dir()
|
local themes_path = gfs.get_themes_dir()
|
||||||
local gears_shape = require("gears.shape")
|
local gears_shape = require("gears.shape")
|
||||||
|
@ -345,6 +346,14 @@ theme.wallpaper = function(s)
|
||||||
return theme_assets.wallpaper(wallpaper_bg, wallpaper_fg, wallpaper_alt_fg, s)
|
return theme_assets.wallpaper(wallpaper_bg, wallpaper_fg, wallpaper_alt_fg, s)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Set different colors for urgent notifications.
|
||||||
|
rnotification.connect_signal('request::rules', function()
|
||||||
|
rnotification.append_rule {
|
||||||
|
rule = { urgency = 'critical' },
|
||||||
|
properties = { bg = '#ff0000', fg = '#ffffff' }
|
||||||
|
}
|
||||||
|
end)
|
||||||
|
|
||||||
return theme
|
return theme
|
||||||
|
|
||||||
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80:foldmethod=marker
|
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80:foldmethod=marker
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
local theme_assets = require("beautiful.theme_assets")
|
local theme_assets = require("beautiful.theme_assets")
|
||||||
local xresources = require("beautiful.xresources")
|
local xresources = require("beautiful.xresources")
|
||||||
|
local rnotification = require("ruled.notification")
|
||||||
local dpi = xresources.apply_dpi
|
local dpi = xresources.apply_dpi
|
||||||
local themes_path = require("gears.filesystem").get_themes_dir()
|
local themes_path = require("gears.filesystem").get_themes_dir()
|
||||||
|
|
||||||
|
@ -97,6 +98,15 @@ theme.titlebar_maximized_button_focus_inactive = themes_path .. "default/titleba
|
||||||
theme.titlebar_maximized_button_normal_active = themes_path .. "default/titlebar/maximized_normal_active.png"
|
theme.titlebar_maximized_button_normal_active = themes_path .. "default/titlebar/maximized_normal_active.png"
|
||||||
theme.titlebar_maximized_button_focus_active = themes_path .. "default/titlebar/maximized_focus_active.png"
|
theme.titlebar_maximized_button_focus_active = themes_path .. "default/titlebar/maximized_focus_active.png"
|
||||||
|
|
||||||
|
|
||||||
|
-- Set different colors for urgent notifications.
|
||||||
|
rnotification.connect_signal('request::rules', function()
|
||||||
|
rnotification.append_rule {
|
||||||
|
rule = { urgency = 'critical' },
|
||||||
|
properties = { bg = '#ff0000', fg = '#ffffff' }
|
||||||
|
}
|
||||||
|
end)
|
||||||
|
|
||||||
return theme
|
return theme
|
||||||
|
|
||||||
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
|
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
|
|
||||||
local theme_assets = require("beautiful.theme_assets")
|
local theme_assets = require("beautiful.theme_assets")
|
||||||
local xresources = require("beautiful.xresources")
|
local xresources = require("beautiful.xresources")
|
||||||
|
local rnotification = require("ruled.notification")
|
||||||
local dpi = xresources.apply_dpi
|
local dpi = xresources.apply_dpi
|
||||||
local xrdb = xresources.get_current_theme()
|
local xrdb = xresources.get_current_theme()
|
||||||
local gfs = require("gears.filesystem")
|
local gfs = require("gears.filesystem")
|
||||||
|
@ -129,6 +130,14 @@ theme.wallpaper = function(s)
|
||||||
return theme_assets.wallpaper(wallpaper_bg, wallpaper_fg, wallpaper_alt_fg, s)
|
return theme_assets.wallpaper(wallpaper_bg, wallpaper_fg, wallpaper_alt_fg, s)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Set different colors for urgent notifications.
|
||||||
|
rnotification.connect_signal('request::rules', function()
|
||||||
|
rnotification.append_rule {
|
||||||
|
rule = { urgency = 'critical' },
|
||||||
|
properties = { bg = '#ff0000', fg = '#ffffff' }
|
||||||
|
}
|
||||||
|
end)
|
||||||
|
|
||||||
return theme
|
return theme
|
||||||
|
|
||||||
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
|
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
-------------------------------
|
-------------------------------
|
||||||
|
|
||||||
local themes_path = require("gears.filesystem").get_themes_dir()
|
local themes_path = require("gears.filesystem").get_themes_dir()
|
||||||
|
local rnotification = require("ruled.notification")
|
||||||
local dpi = require("beautiful.xresources").apply_dpi
|
local dpi = require("beautiful.xresources").apply_dpi
|
||||||
|
|
||||||
-- {{{ Main
|
-- {{{ Main
|
||||||
|
@ -131,6 +132,14 @@ theme.titlebar_maximized_button_normal_inactive = themes_path .. "zenburn/titleb
|
||||||
-- }}}
|
-- }}}
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
|
-- Set different colors for urgent notifications.
|
||||||
|
rnotification.connect_signal('request::rules', function()
|
||||||
|
rnotification.append_rule {
|
||||||
|
rule = { urgency = 'critical' },
|
||||||
|
properties = { bg = '#ff0000', fg = '#ffffff' }
|
||||||
|
}
|
||||||
|
end)
|
||||||
|
|
||||||
return theme
|
return theme
|
||||||
|
|
||||||
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
|
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
|
||||||
|
|
Loading…
Reference in New Issue