awful: readd support for square in taglist

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-07-29 17:48:39 +02:00
parent c7e70fbe7f
commit d0f9cbade8
3 changed files with 15 additions and 3 deletions

BIN
icons/taglist/squarefw.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 205 B

BIN
icons/taglist/squarew.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 217 B

View File

@ -771,10 +771,22 @@ end
-- @return A string to print.
function P.widget.taglist.label.all(t, bg_focus, fg_focus)
local text = ""
if t.selected then
text = "<bg color='"..bg_focus.."'/> <span color='"..fg_focus.."'>"..t.name.."</span> "
local background = ""
local sel = client.focus_get()
if sel and sel:istagged(t) then
background = "resize=\"true\" image=\"@AWESOME_ICON_PATH@/taglist/squarefw.png\""
else
text = " "..t.name.." "
for k, c in pairs(client.get()) do
if c:istagged(t) then
background = "resize=\"true\" image=\"@AWESOME_ICON_PATH@/taglist/squarew.png\""
break
end
end
end
if t.selected then
text = "<bg "..background.." color='"..bg_focus.."'/> <span color='"..fg_focus.."'>"..P.escape(t.name).."</span> "
else
text = " <bg "..background.." />"..P.escape(t.name).." "
end
return text
end