summaryrefslogtreecommitdiffstats
path: root/.config
diff options
context:
space:
mode:
authorGravatar Tom Willemsen2012-09-13 10:57:37 +0200
committerGravatar Tom Willemsen2012-09-13 10:57:37 +0200
commitadf8e13bb0e722ca6e98d85182b41a47a6e26621 (patch)
treeeafe61be0e7c2506bd6045d6dec0b496bdadac64 /.config
parent377b0ea4c289ade36cae192c9b10129c2f3d167b (diff)
downloaddotfiles-adf8e13bb0e722ca6e98d85182b41a47a6e26621.tar.gz
dotfiles-adf8e13bb0e722ca6e98d85182b41a47a6e26621.zip
.config/awesome/rc.lua
Diffstat (limited to '.config')
-rw-r--r--.config/awesome/rc.lua20
1 files changed, 20 insertions, 0 deletions
diff --git a/.config/awesome/rc.lua b/.config/awesome/rc.lua
index b602eb7..b544d93 100644
--- a/.config/awesome/rc.lua
+++ b/.config/awesome/rc.lua
@@ -54,6 +54,15 @@ function oni.mailcount(account)
return i
end
+function oni.mailcount_text()
+ return string.format("ryu: %d aet: %d gmail: %d 9f: %d",
+ oni.mailcount("ryuslash.org"),
+ oni.mailcount("aethon"),
+ oni.mailcount("gmail"),
+ oni.mailcount("ninthfloor"))
+end
+
+
-- Returns true if all pairs in table1 are present in table2
function oni.match(table1, table2)
for k, v in pairs(table1) do
@@ -190,6 +199,16 @@ mytextclock = awful.widget.textclock({ align = "right" })
-- Create a systray
mysystray = widget({ type = "systray" })
+-- Create a mailbox widget
+mymailbox = widget({ type = "textbox" })
+mymailbox.text = oni.mailcount_text()
+mymailboxtimer = timer({ timeout = 60 })
+mymailboxtimer:add_signal("timeout",
+ function ()
+ mymailbox.text = oni.mailcount_text()
+ end)
+mymailboxtimer:start()
+
-- Create a wibox for each screen and add it
mywibox = {}
mypromptbox = {}
@@ -267,6 +286,7 @@ for s = 1, screen.count() do
mylayoutbox[s],
mytextclock,
s == 1 and mysystray or nil,
+ s == 1 and mymailbox or nil,
mytasklist[s],
layout = awful.widget.layout.horizontal.rightleft
}