From 9c916d5b05f729a3c71d74393d5e4ad8bddd8314 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20G=C3=B6rlich?= Date: Wed, 4 Dec 2013 13:30:29 +0100 Subject: [PATCH 1/2] Count id tokens instead of every single diget --- widgets/imap.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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() From d4f59f292c3c499d997323f3c88b860775cad0c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20G=C3=B6rlich?= Date: Wed, 4 Dec 2013 18:52:40 +0100 Subject: [PATCH 2/2] Fix unread count in imap widget --- widgets/imap.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/widgets/imap.lua b/widgets/imap.lua index 87a9e61..39518bd 100644 --- a/widgets/imap.lua +++ b/widgets/imap.lua @@ -62,6 +62,7 @@ local function worker(args) f:close() _, mailcount = string.gsub(ws, "%d+", "") + _ = nil widget = imap.widget settings()