X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/8d15b03ecac62e4d9a0312ca7cd4ad0503692841..013654cd1af4bb69f31c1c641cdb24bd8b7c58df:/widget/imap.lua?ds=sidebyside diff --git a/widget/imap.lua b/widget/imap.lua index 75270f1..b3d9dc7 100644 --- a/widget/imap.lua +++ b/widget/imap.lua @@ -66,7 +66,7 @@ local function factory(args) helpers.async(curl, function(f) imap_now = { ["MESSAGES"] = 0, ["RECENT"] = 0, ["UNSEEN"] = 0 } - for s, d in f:gmatch("(%w+)%s+(%d+)") do imap_now[s] = tonumber(d) end + for s,d in f:gmatch("(%w+)%s+(%d+)") do imap_now[s] = tonumber(d) end mailcount = imap_now["UNSEEN"] -- backwards compatibility widget = imap.widget @@ -79,7 +79,8 @@ local function factory(args) text = string.format("%s has %d new message%s", mail, mailcount, mailcount == 1 and "" or "s") } end - helpers.set_map(mail, mailcount) + + helpers.set_map(mail, imap_now["UNSEEN"]) end) end