summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2021-02-25 16:57:24 +0100
committerAnton Khirnov <anton@khirnov.net>2021-02-25 16:57:24 +0100
commit34ae3a00fa69b7c4a030ce00aafe8ff9e26bfc60 (patch)
treee0837b785789b5a920e10f71b9f97973a04efcfe
parent00f1513a1c11bab7e4ac194628fb33b522fe2176 (diff)
pager: style urgent clients
-rw-r--r--pager.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/pager.lua b/pager.lua
index f4d3054..d1c6b9f 100644
--- a/pager.lua
+++ b/pager.lua
@@ -38,6 +38,8 @@ function Page:client_add(client)
local fg_normal = beautiful.fg_normal or "#ffffff"
local bg_focus = beautiful.bg_focus or "#ffffff"
local fg_focus = beautiful.fg_focus or "#000000"
+ local bg_urgent = beautiful.bg_urgent or "#ffffff"
+ local fg_urgent = beautiful.fg_urgent or "#d00000"
local tb = wibox.widget.textbox(text, true)
local bg = wibox.container.background(tb, bg)
@@ -59,6 +61,13 @@ function Page:client_add(client)
bg:set_fg(fg_normal)
end
end)
+ client:connect_signal("property::urgent",
+ function(c)
+ if c.screen == self.screen then
+ bg:set_bg(bg_urgent)
+ bg:set_fg(fg_urgent)
+ end
+ end)
self.client_container:add(bg)
self._widgets[client] = bg