From 34ae3a00fa69b7c4a030ce00aafe8ff9e26bfc60 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Thu, 25 Feb 2021 16:57:24 +0100 Subject: pager: style urgent clients --- pager.lua | 9 +++++++++ 1 file changed, 9 insertions(+) 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 -- cgit v1.2.3