X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/4148ccdfcd5ed620163f9d78e6224c684a358ac7..d9877c4bedca550478507f268f43e137e4454c24:/widgets/maildir.lua diff --git a/widgets/maildir.lua b/widgets/maildir.lua index 2f435b3..1f4cd45 100644 --- a/widgets/maildir.lua +++ b/widgets/maildir.lua @@ -10,12 +10,10 @@ local awful = require("awful") local wibox = require("wibox") local helpers = require("lain.helpers") - local io = { popen = io.popen } local os = { getenv = os.getenv } local string = { format = string.format, match = string.match } - local setmetatable = setmetatable -- Maildir check (synchronous) @@ -32,7 +30,7 @@ local function worker(args) maildir.widget = wibox.widget.textbox() - function update() + function maildir.update() if ext_mail_cmd then awful.spawn(ext_mail_cmd) end -- Find pathes to mailboxes. @@ -78,7 +76,7 @@ local function worker(args) settings() end - helpers.newtimer(mailpath, timeout, update, true) + maildir.timer = helpers.newtimer(mailpath, timeout, maildir.update, true, true) return setmetatable(maildir, { __index = maildir.widget }) end