Use special character to represent locked/unlocked

This commit is contained in:
Tom Willemse 2014-09-24 00:10:41 +02:00
parent a7a4c1dd35
commit 182f3514e6

View file

@ -218,14 +218,22 @@ myrsslisttimer:start()
function unlocked()
if awful.util.pread("gkeyring -1 --name unlocked") == "true" then
return "unlocked"
return ""
else
return "locked"
return ""
end
end
mykeyringlist = wibox.widget.textbox()
mykeyringlist:set_text(unlocked())
mykeyringlist:set_font("FontAwesome")
mykeyringlist:buttons(
awful.util.table.join(
awful.button({ }, 2, function ()
mykeyringlist:set_text(unlocked())
end)
)
)
mykeyringlisttimer = timer({ timeout = 60 })
mykeyringlisttimer:connect_signal(
"timeout",
@ -267,9 +275,9 @@ for s = 1, screen.count() do
-- Widgets that are aligned to the right
local right_layout = wibox.layout.fixed.horizontal()
if s == 1 then
right_layout:add(mykeyringlist)
right_layout:add(myrsslist)
right_layout:add(mymaillist)
right_layout:add(mykeyringlist)
right_layout:add(wibox.widget.systray())
end
right_layout:add(mytextclock)