Hi,

I like to display the empty tags in my taglist in a greyish colour to
make them a bit less prominent. There was no way to specify the colour
for empty tags, so I made this simple patch that adds a new setting
[bg|fg]_empty for that purpose.

Cheers,
Jan
diff --git a/lib/awful/widget/taglist.lua b/lib/awful/widget/taglist.lua
index 9f84df8..5f85491 100644
--- a/lib/awful/widget/taglist.lua
+++ b/lib/awful/widget/taglist.lua
@@ -34,6 +34,8 @@ function taglist.taglist_label(t, args)
     local bg_urgent = args.bg_urgent or theme.taglist_bg_urgent or theme.bg_urgent
     local bg_occupied = args.bg_occupied or theme.taglist_bg_occupied
     local fg_occupied = args.fg_occupied or theme.taglist_fg_occupied
+    local bg_empty = args.bg_empty or theme.taglist_bg_empty
+    local fg_empty = args.fg_empty or theme.taglist_fg_empty
     local taglist_squares_sel = args.squares_sel or theme.taglist_squares_sel
     local taglist_squares_unsel = args.squares_unsel or theme.taglist_squares_unsel
     local taglist_squares_sel_empty = args.squares_sel_empty or theme.taglist_squares_sel_empty
@@ -84,6 +86,8 @@ function taglist.taglist_label(t, args)
                 bg_image = taglist_squares_unsel_empty
                 bg_resize = taglist_squares_resize == "true"
             end
+            if bg_empty then bg_color = bg_empty end
+            if fg_empty then fg_color = fg_empty end
         end
         for k, c in pairs(cls) do
             if c.urgent then
diff --git a/themes/default/theme.lua b/themes/default/theme.lua
index 1aec298..0fc683c 100644
--- a/themes/default/theme.lua
+++ b/themes/default/theme.lua
@@ -25,7 +25,8 @@ theme.border_marked = "#91231c"
 -- There are other variable sets
 -- overriding the default one when
 -- defined, the sets are:
--- [taglist|tasklist]_[bg|fg]_[focus|urgent]
+-- taglist_[bg|fg]_[focus|urgent|occupied|empty]
+-- tasklist_[bg|fg]_[focus|urgent]
 -- titlebar_[bg|fg]_[normal|focus]
 -- tooltip_[font|opacity|fg_color|bg_color|border_width|border_color]
 -- mouse_finder_[color|timeout|animate_timeout|radius|factor]

Reply via email to