-
Notifications
You must be signed in to change notification settings - Fork 0
/
wrapper.py.dist
executable file
·50 lines (43 loc) · 1.25 KB
/
wrapper.py.dist
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import mailchecker
import modsde
import notmuchmailchecker
from statushandler import I3statusHandler
if __name__ == '__main__':
status = I3statusHandler()
#List the modules
mailsettings = {
'color': '#ff0000',
'servers': [
{
'host': 'www.testhost1.com',
'port': '993',
'ssl' : True,
'username': 'your_username',
'password': 'your_password',
'pause': 20
},
{
'host': 'www.testhost2.net',
'port': '993',
'ssl' : True,
'username': 'your_username',
'password': 'your_password',
'pause': 20
}
]
}
mailchecker = mailchecker.MailChecker(mailsettings)
status.register_module(mailchecker)
mdesettings = {
'username': "your_username",
'password': "your_password"
}
mde = modsde.ModsDeChecker(mdesettings)
status.register_module(mde)
db_path = 'path_to_your_notmuch_database'
notmuch = notmuchmailchecker.NotmuchMailChecker(db_path)
status.register_module(notmuch)
# start the handler
status.run()