imap: add notify option to disable notifications (read the wiki)

This commit is contained in:
Luke Bonham 2017-07-25 21:34:07 +02:00
parent 721ae4b7b5
commit 0ef7864227
2 changed files with 3 additions and 2 deletions

View File

@ -27,6 +27,7 @@ local function factory(args)
local timeout = args.timeout or 60
local is_plain = args.is_plain or false
local followtag = args.followtag or false
local notify = args.notify or "on"
local settings = args.settings or function() end
local head_command = "curl --connect-timeout 3 -fsm 3"
@ -64,7 +65,7 @@ local function factory(args)
widget = imap.widget
settings()
if mailcount >= 1 and mailcount > helpers.get_map(mail) then
if notify == "on" and mailcount >= 1 and mailcount > helpers.get_map(mail) then
if mailcount == 1 then
nt = mail .. " has one new message"
else

2
wiki

@ -1 +1 @@
Subproject commit bb1a4d45d8ec98109167a53a4ebf2ef9017843c3
Subproject commit cc064cb376f34844abba70ab58de2df1e397955b