.config/awesome/rc.lua
This commit is contained in:
parent
377b0ea4c2
commit
adf8e13bb0
1 changed files with 20 additions and 0 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue