Use special character to represent locked/unlocked
This commit is contained in:
parent
a7a4c1dd35
commit
182f3514e6
1 changed files with 11 additions and 3 deletions
|
@ -218,14 +218,22 @@ myrsslisttimer:start()
|
||||||
|
|
||||||
function unlocked()
|
function unlocked()
|
||||||
if awful.util.pread("gkeyring -1 --name unlocked") == "true" then
|
if awful.util.pread("gkeyring -1 --name unlocked") == "true" then
|
||||||
return "unlocked"
|
return " "
|
||||||
else
|
else
|
||||||
return "locked"
|
return " "
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
mykeyringlist = wibox.widget.textbox()
|
mykeyringlist = wibox.widget.textbox()
|
||||||
mykeyringlist:set_text(unlocked())
|
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 = timer({ timeout = 60 })
|
||||||
mykeyringlisttimer:connect_signal(
|
mykeyringlisttimer:connect_signal(
|
||||||
"timeout",
|
"timeout",
|
||||||
|
@ -267,9 +275,9 @@ for s = 1, screen.count() do
|
||||||
-- Widgets that are aligned to the right
|
-- Widgets that are aligned to the right
|
||||||
local right_layout = wibox.layout.fixed.horizontal()
|
local right_layout = wibox.layout.fixed.horizontal()
|
||||||
if s == 1 then
|
if s == 1 then
|
||||||
right_layout:add(mykeyringlist)
|
|
||||||
right_layout:add(myrsslist)
|
right_layout:add(myrsslist)
|
||||||
right_layout:add(mymaillist)
|
right_layout:add(mymaillist)
|
||||||
|
right_layout:add(mykeyringlist)
|
||||||
right_layout:add(wibox.widget.systray())
|
right_layout:add(wibox.widget.systray())
|
||||||
end
|
end
|
||||||
right_layout:add(mytextclock)
|
right_layout:add(mytextclock)
|
||||||
|
|
Loading…
Reference in a new issue