X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/b0bcf77ccc17dc18b6294b63de12ce3e70b53345..d3cf8f992b0a987122155e72f15ee286ad8f7965:/widgets/imap.lua?ds=inline diff --git a/widgets/imap.lua b/widgets/imap.lua index d4b4cba..a17b02f 100644 --- a/widgets/imap.lua +++ b/widgets/imap.lua @@ -42,7 +42,7 @@ local function worker(args) if not is_plain then local f = io.popen(password) - password = f:read("*a"):gsub("\n", "") + password = f:read("*all"):gsub("\n", "") f:close() end @@ -54,11 +54,11 @@ local function worker(args) position = "top_left" } - curl = string.format("%s --url imaps://%s:%s/INBOX -u %s:%s %s -k", + curl = string.format("%s --url imaps://%s:%s/INBOX -u %s:%q %s -k", head_command, server, port, mail, password, request) async.request(curl, function(f) - ws = f:read("*a") + ws = f:read("*all") f:close() _, mailcount = string.gsub(ws, "%d+", "") @@ -76,7 +76,7 @@ local function worker(args) end naughty.notify({ preset = mail_notification_preset, - text = nt, + text = nt }) end