X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/669112020d022b3b9cb023c82230e21d36aa88cf..c752bc0c50e0b9c2df38263d2f67b0ced3242e1e:/widgets/imap.lua?ds=sidebyside diff --git a/widgets/imap.lua b/widgets/imap.lua index 6574276..b3f281d 100644 --- a/widgets/imap.lua +++ b/widgets/imap.lua @@ -14,6 +14,7 @@ local wibox = require("wibox") local io = { popen = io.popen } local string = { format = string.format, gsub = string.gsub } +local tonumber = tonumber local setmetatable = setmetatable @@ -52,7 +53,7 @@ local function worker(args) icon = helpers.icons_dir .. "mail.png", position = "top_left" } - + curl = string.format("%s --url imaps://%s:%s/INBOX -u %s:%s %s -k", head_command, server, port, mail, password, request) @@ -61,7 +62,8 @@ local function worker(args) f:close() t, mailcount = string.gsub(ws, "%d", "") - t = nil -- because it's useless + t = nil + mailcount = tonumber(mailcount) widget = imap.widget settings()