Show keyring lock state in awesome
This commit is contained in:
parent
8ac24fb0eb
commit
a7a4c1dd35
1 changed files with 20 additions and 0 deletions
|
@ -216,6 +216,25 @@ myrsslisttimer:connect_signal(
|
|||
)
|
||||
myrsslisttimer:start()
|
||||
|
||||
function unlocked()
|
||||
if awful.util.pread("gkeyring -1 --name unlocked") == "true" then
|
||||
return "unlocked"
|
||||
else
|
||||
return "locked"
|
||||
end
|
||||
end
|
||||
|
||||
mykeyringlist = wibox.widget.textbox()
|
||||
mykeyringlist:set_text(unlocked())
|
||||
mykeyringlisttimer = timer({ timeout = 60 })
|
||||
mykeyringlisttimer:connect_signal(
|
||||
"timeout",
|
||||
function ()
|
||||
mykeyringlist:set_text(unlocked())
|
||||
end
|
||||
)
|
||||
mykeyringlisttimer:start()
|
||||
|
||||
for s = 1, screen.count() do
|
||||
-- Create a promptbox for each screen
|
||||
mypromptbox[s] = awful.widget.prompt()
|
||||
|
@ -248,6 +267,7 @@ 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(wibox.widget.systray())
|
||||
|
|
Loading…
Reference in a new issue