X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/f7aa28919588d307083b4b5b1c010f26cbc63cde..ada338f4db16cb69f2510c057b4535e0738dfff6:/widgets/imap.lua

diff --git a/widgets/imap.lua b/widgets/imap.lua
index 605c1c4..39518bd 100644
--- a/widgets/imap.lua
+++ b/widgets/imap.lua
@@ -61,9 +61,8 @@ local function worker(args)
         ws = f:read("*all")
         f:close()
 
-        t, mailcount = string.gsub(ws, "%d", "")
-        t = nil -- because it's useless
-        mailcount = tonumber(mailcount)
+        _, mailcount = string.gsub(ws, "%d+", "")
+        _ = nil
 
         widget = imap.widget
         settings()