Taglist: Add {bg,fg}_occupied theme options

This commit adds a new {bg,fg}_occupied option to the taglist. These control the
background and foreground color that unselected but occupied tags get in the
taglist. Occupied here means that at least one client is tagged with that tag.

Thanks to NougatRillettes for submitting this.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2012-04-06 19:21:40 +02:00
parent ba64f3c3cd
commit 6841999a47
1 changed files with 9 additions and 3 deletions

View File

@ -31,6 +31,8 @@ function taglist_label(t, args)
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_occupied = args.bg_occupied or theme.taglist_bg_occupied
local fg_occupied = args.fg_occupied or theme.taglist_fg_occupied
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_resize = theme.taglist_squares_resize or args.squares_resize or "true"
@ -63,9 +65,13 @@ function taglist_label(t, args)
end
if not is_selected then
local cls = t:clients()
if #cls > 0 and taglist_squares_unsel then
bg_image = capi.awesome.load_image(taglist_squares_unsel)
bg_resize = taglist_squares_resize == "true"
if #cls > 0 then
if taglist_squares_unsel then
bg_image = capi.awesome.load_image(taglist_squares_unsel)
bg_resize = taglist_squares_resize == "true"
end
if bg_occupied then bg_color = bg_occupied end
if fg_occupied then fg_color = fg_occupied end
end
for k, c in pairs(cls) do
if c.urgent then