From: Manuel Görlich Date: Wed, 4 Dec 2013 12:30:29 +0000 (+0100) Subject: Count id tokens instead of every single diget X-Git-Url: https://git.madduck.net/etc/awesome.git/commitdiff_plain/9c916d5b05f729a3c71d74393d5e4ad8bddd8314?ds=sidebyside;hp=-c Count id tokens instead of every single diget --- 9c916d5b05f729a3c71d74393d5e4ad8bddd8314 diff --git a/widgets/imap.lua b/widgets/imap.lua index b3f281d..87a9e61 100644 --- a/widgets/imap.lua +++ b/widgets/imap.lua @@ -61,9 +61,7 @@ local function worker(args) ws = f:read("*all") f:close() - t, mailcount = string.gsub(ws, "%d", "") - t = nil - mailcount = tonumber(mailcount) + _, mailcount = string.gsub(ws, "%d+", "") widget = imap.widget settings()