From 952d12d56012ee01dafd679bba8089b594d07752 Mon Sep 17 00:00:00 2001 From: Adam Cooper Date: Mon, 17 Jun 2024 09:55:18 -0400 Subject: [PATCH] [awesome] Customized notification theming This work is still commented out for now. Once we successfully switch to awesome-git we can bring these changes in. --- awesome/rc.lua | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/awesome/rc.lua b/awesome/rc.lua index d40bcf6..d307849 100644 --- a/awesome/rc.lua +++ b/awesome/rc.lua @@ -14,6 +14,7 @@ local beautiful = require("beautiful") local naughty = require("naughty") local menubar = require("menubar") local lain = require("lain") +-- local ruled = require("ruled") local hotkeys_popup = require("awful.hotkeys_popup") -- Enable hotkeys help widget for VIM and other apps -- when client with a matching name is opened: @@ -173,6 +174,27 @@ local function set_wallpaper(s) end end +-- Notifications +--[[ +ruled.notification.connect_signal("request::rules", function() + -- Add a red background for urgent notifications. + ruled.notification.append_rule { + rule = { urgency = "critical" }, + properties = { bg = "#ff0000", fg = "#32cd32", timeout = 0 } + } + + -- Or green background for normal ones. + ruled.notification.append_rule { + rule = { urgency = "normal" }, + properties = { bg = "#32cd32", fg = "#800080"} + } + ruled.notification.append_rule { + rule = { urgency = "low" }, + properties = { bg = "#bbccff", fg = "#191970"} + } +end) +--]] + -- Re-set wallpaper when a screen's geometry changes (e.g. different resolution) screen.connect_signal("property::geometry", set_wallpaper)