>> > I've been trying to use the ones in the User Contributed Widgets section 
>> > on the site, but with no luck.
>> >
>>
>> This one: https://awesome.naquadah.org/wiki/Asmer_imap_mail_widget
>>
>> --- Mail updater
>> mymail = wibox.widget.textbox()
>> mymail.text = "  ?  "
>>
>> I thin the hook section is ok right now
>>
>> -- Hook (check mail every 30 seconds)
>>
>> awful.hooks.timer.register(30, function ()
>>     local f = io.open("/home/YOUR_USER/tmp/gmail")
>>     local l = nil
>>     if f ~= nil then
>>        l = f:read() -- read output of command
>>     else
>>        l = "  ?  "
>>     end
>>     f:close()
>>
>>     mymail.text = l
>>     os.execute("~/scripts/unread.py > ~/tmp/gmail &")
>> end)

It doesn't work of course because the timer API have changed. You
should change 'awful.hooks.timer.register' to:

my_email_timer = timer{timeout=30}
my_email_timer:connect_signal("timeout",function()
    ---- as you wrote above ---
end)

Please check the "new" API to "adapt" old widgets to work :)

Zsolt

-- 
To unsubscribe, send mail to [email protected].

Reply via email to