diff --git a/themes/default/theme.lua b/themes/default/theme.lua index fd9f9c43..79a4d2ee 100644 --- a/themes/default/theme.lua +++ b/themes/default/theme.lua @@ -4,6 +4,7 @@ local theme_assets = require("beautiful.theme_assets") local xresources = require("beautiful.xresources") +local rnotification = require("ruled.notification") local dpi = xresources.apply_dpi 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. 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 -- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80 diff --git a/themes/gtk/theme.lua b/themes/gtk/theme.lua index 392791ff..ff780e67 100644 --- a/themes/gtk/theme.lua +++ b/themes/gtk/theme.lua @@ -5,6 +5,7 @@ local theme_assets = require("beautiful.theme_assets") local dpi = require("beautiful.xresources").apply_dpi +local rnotification = require("ruled.notification") local gfs = require("gears.filesystem") local themes_path = gfs.get_themes_dir() 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) 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 -- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80:foldmethod=marker diff --git a/themes/sky/theme.lua b/themes/sky/theme.lua index b724bad8..18c678c6 100644 --- a/themes/sky/theme.lua +++ b/themes/sky/theme.lua @@ -6,6 +6,7 @@ local theme_assets = require("beautiful.theme_assets") local xresources = require("beautiful.xresources") +local rnotification = require("ruled.notification") local dpi = xresources.apply_dpi 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_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 -- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80 diff --git a/themes/xresources/theme.lua b/themes/xresources/theme.lua index 4168bcc0..11edfe7d 100644 --- a/themes/xresources/theme.lua +++ b/themes/xresources/theme.lua @@ -5,6 +5,7 @@ local theme_assets = require("beautiful.theme_assets") local xresources = require("beautiful.xresources") +local rnotification = require("ruled.notification") local dpi = xresources.apply_dpi local xrdb = xresources.get_current_theme() 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) 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 -- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80 diff --git a/themes/zenburn/theme.lua b/themes/zenburn/theme.lua index ead4081b..ea933d8b 100644 --- a/themes/zenburn/theme.lua +++ b/themes/zenburn/theme.lua @@ -4,6 +4,7 @@ ------------------------------- local themes_path = require("gears.filesystem").get_themes_dir() +local rnotification = require("ruled.notification") local dpi = require("beautiful.xresources").apply_dpi -- {{{ 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 -- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80