From 8bafd2488223610b8a3a166ac4fe8459ef82f944 Mon Sep 17 00:00:00 2001 From: Espen Wiborg Date: Thu, 13 Nov 2008 10:19:09 +0100 Subject: [PATCH] awful.widget: Implement taglist.label.noempty in terms of label.all This gives .noempty lovers a share in the taglist_squares goodness. Signed-off-by: Espen Wiborg Signed-off-by: Julien Danjou --- lib/awful/widget.lua.in | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/lib/awful/widget.lua.in b/lib/awful/widget.lua.in index dc9a706a..701b9c24 100644 --- a/lib/awful/widget.lua.in +++ b/lib/awful/widget.lua.in @@ -151,35 +151,7 @@ end -- @return A string to print. function taglist.label.noempty(t, args) if #t:clients() > 0 or t.selected then - if not args then args = {} end - local theme = beautiful.get() - local fg_focus = args.fg_focus or theme.taglist_fg_focus or theme.fg_focus - local bg_focus = args.bg_focus or theme.taglist_bg_focus or theme.bg_focus - local fg_urgent = args.fg_urgent or theme.taglist_fg_urgent or theme.fg_urgent - local bg_urgent = args.bg_urgent or theme.taglist_bg_urgent or theme.bg_urgent - local bg_color = nil - local fg_color = nil - local text - - if t.selected then - bg_color = bg_focus - fg_color = fg_focus - end - if bg_urgent and fg_urgent then - for k, c in pairs(t:clients()) do - if c.urgent then - bg_color = bg_urgent - fg_color = fg_urgent - break - end - end - end - if fg_color and bg_color then - text = " " .. util.escape(t.name) .. " " - else - text = " " .. util.escape(t.name) .. " " - end - return text + return taglist.label.all(t, args) end end