awesome: Add org todo counts to wibox

This commit is contained in:
Tom Willemsen 2013-02-07 09:29:24 +01:00
parent 11183df017
commit fdb9679e2d

View file

@ -157,6 +157,7 @@ mypromptbox = {}
mylayoutbox = {} mylayoutbox = {}
mytaglist = {} mytaglist = {}
mytasklist = {} mytasklist = {}
mymaillist = wibox.widget.textbox() mymaillist = wibox.widget.textbox()
mymaillist:set_text( mymaillist:set_text(
string.format(" ryu: %d gmail: %d aethon: %d 9f: %d", string.format(" ryu: %d gmail: %d aethon: %d 9f: %d",
@ -177,6 +178,22 @@ mymaillisttimer:connect_signal(
end) end)
mymaillisttimer:start() mymaillisttimer:start()
mytodolist = wibox.widget.textbox()
mytodolist:set_text(
string.format(" ptodo: %d wtodo: %d",
awful.util.pread("todo-count t"),
awful.util.pread("todo-count w")))
mytodolisttimer = timer({ timeout = 60 * 60 })
mytodolisttimer:connect_signal(
"timeout",
function ()
mytodolist:set_text(
string.format(" pers: %d work: %d",
awful.util.pread("todo-count t"),
awful.util.pread("todo-count w")))
end)
mytodolisttimer:start()
for s = 1, screen.count() do for s = 1, screen.count() do
-- Create a promptbox for each screen -- Create a promptbox for each screen
mypromptbox[s] = awful.widget.prompt() mypromptbox[s] = awful.widget.prompt()
@ -204,6 +221,7 @@ 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(mytodolist)
right_layout:add(mymaillist) right_layout:add(mymaillist)
right_layout:add(wibox.widget.systray()) right_layout:add(wibox.widget.systray())
end end