awful: make displaying the taglist squares a theme variable

This commit is contained in:
Lucas de Vries 2008-08-13 22:48:41 +02:00
parent 469a44f0db
commit 6ae0d554a8
1 changed files with 7 additions and 2 deletions

View File

@ -1148,6 +1148,7 @@ function widget.taglist.label.all(t, args)
local bg_focus = args.bg_focus or theme.bg_focus
local fg_urgent = args.fg_urgent or theme.fg_urgent
local bg_urgent = args.bg_urgent or theme.bg_urgent
local taglist_squares = args.taglist_squares or theme.taglist_squares
local text
local background = ""
local sel = capi.client.focus
@ -1158,10 +1159,14 @@ function widget.taglist.label.all(t, args)
fg_color = fg_focus
end
if sel and sel:tags()[t] then
background = "resize=\"true\" image=\"@AWESOME_ICON_PATH@/taglist/squarefw.png\""
if taglist_squares == nil or taglist_squares == true then
background = "resize=\"true\" image=\"@AWESOME_ICON_PATH@/taglist/squarefw.png\""
end
elseif bg_urgent and fg_urgent then
for k, c in pairs(t:clients()) do
background = "resize=\"true\" image=\"@AWESOME_ICON_PATH@/taglist/squarew.png\""
if taglist_squares == nil or taglist_squares == true then
background = "resize=\"true\" image=\"@AWESOME_ICON_PATH@/taglist/squarew.png\""
end
if c.urgent then
bg_color = bg_urgent
fg_color = fg_urgent