X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/6e43bfa5128be39efe554678f8a0670b6c0038a6..fdf8132242195669ee6eeff5e4c91da1c372ee47:/widgets/imap.lua?ds=sidebyside diff --git a/widgets/imap.lua b/widgets/imap.lua index 1dca87c..1ebbb76 100644 --- a/widgets/imap.lua +++ b/widgets/imap.lua @@ -34,7 +34,7 @@ local function worker(args) local is_plain = args.is_plain or false local settings = args.settings or function() end - local head_command = "curl --connect-timeout 1 -fsm 3" + local head_command = "curl --connect-timeout 3 -fsm 3" local request = "-X 'SEARCH (UNSEEN)'" helpers.set_map(mail, 0) @@ -54,10 +54,10 @@ 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) + async.request(curl, function(f) ws = f:read("*a") f:close() @@ -77,7 +77,6 @@ local function worker(args) naughty.notify({ preset = mail_notification_preset, text = nt, - screen = client.focus and client.focus.screen or 1 }) end