diff --git a/awesome/.config/awesome/rc.lua b/awesome/.config/awesome/rc.lua index 59c2fcb..a515339 100644 --- a/awesome/.config/awesome/rc.lua +++ b/awesome/.config/awesome/rc.lua @@ -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())