From fdb9679e2ddff78f4e737d519c20c944d78088ac Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Thu, 7 Feb 2013 09:29:24 +0100 Subject: [PATCH] awesome: Add org todo counts to wibox --- .config/awesome/rc.lua | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.config/awesome/rc.lua b/.config/awesome/rc.lua index d09593f..3fb0d1f 100644 --- a/.config/awesome/rc.lua +++ b/.config/awesome/rc.lua @@ -157,6 +157,7 @@ mypromptbox = {} mylayoutbox = {} mytaglist = {} mytasklist = {} + mymaillist = wibox.widget.textbox() mymaillist:set_text( string.format(" ryu: %d gmail: %d aethon: %d 9f: %d", @@ -177,6 +178,22 @@ mymaillisttimer:connect_signal( end) 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 -- Create a promptbox for each screen mypromptbox[s] = awful.widget.prompt() @@ -204,6 +221,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(mytodolist) right_layout:add(mymaillist) right_layout:add(wibox.widget.systray()) end