X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/4bde4b5eea6ad1352078228c0d146f41b4c893e4..ac6615db205af4ac3679b1cd87941fa2b32306bf:/widgets/imap.lua 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()