X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/018fb197df0cc802db2329d8c1a87f4d89810e0f..d3b5b5a94d974e678d10a8670886e17a354eede5:/widget/imap.lua?ds=inline 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