awesomerc: display icons when client is floating

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-07-09 12:34:42 +02:00
parent 3f46ec2152
commit e9407c9670
3 changed files with 9 additions and 3 deletions

View File

@ -92,10 +92,16 @@ mytasklist:mouse_add(mouse({ }, 1, function (object, c) c:focus_set(); c:raise()
mytasklist:mouse_add(mouse({ }, 4, function () awful.client.focus(1) end))
mytasklist:mouse_add(mouse({ }, 5, function () awful.client.focus(-1) end))
function mytasklist.label(c)
if client.focus_get() == c then
return " <bg color='"..bg_focus.."'/><span color='"..fg_focus.."'><title/></span> "
local text = ""
if c.floating then
text = text .. "<bg image=\"@AWESOME_ICON_PATH@/floatingw.png\" align=\"right\"/>"
end
return " <title/> "
if client.focus_get() == c then
text = text .. " <bg color='"..bg_focus.."'/><span color='"..fg_focus.."'><title/></span> "
else
text = text .. " <title/> "
end
return text
end
-- Create a textbox widget

BIN
icons/floating.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 401 B

BIN
icons/floatingw.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 401 B