Fixed issue #9
Notmuch checker does not work in this state NotmuchMailChecker does not work because of a conflict between the notmuch Python API and the file for NotmuchMailChecker which is also named notmuch. I suggest to rename i3pystatus/notmuch.py to i3pystatus/notmuchchecker.py and modify main.py.dist appropriately. Reported by mjepronk Also removed some superfluous whitespace
This commit is contained in:
parent
8a1041ac0e
commit
62b59db8d6
@ -5,7 +5,7 @@ from i3pystatus import (
|
||||
I3statusHandler,
|
||||
mailchecker,
|
||||
modsde,
|
||||
notmuch,
|
||||
notmuchmail,
|
||||
thunderbird,
|
||||
regex,
|
||||
)
|
||||
@ -62,7 +62,7 @@ status.register(mde)
|
||||
|
||||
# the notmuch mail checker module
|
||||
db_path = "path_to_your_notmuch_database"
|
||||
nm = notmuch.NotmuchMailChecker(db_path)
|
||||
nm = notmuchmail.NotmuchMailChecker(db_path)
|
||||
status.register(nm)
|
||||
|
||||
|
||||
|
@ -9,12 +9,12 @@ import json
|
||||
from i3pystatus import IntervalModule
|
||||
|
||||
class NotmuchMailChecker(IntervalModule):
|
||||
"""
|
||||
"""
|
||||
This class uses the notmuch python bindings to check for the
|
||||
number of messages in the notmuch database with the tags "inbox"
|
||||
and "unread"
|
||||
"""
|
||||
|
||||
|
||||
db_path = ""
|
||||
|
||||
def __init__(self, db_path):
|
||||
@ -23,7 +23,7 @@ class NotmuchMailChecker(IntervalModule):
|
||||
def run(self):
|
||||
db = notmuch.Database(self.db_path)
|
||||
unread = notmuch.Query(db, "tag:unread and tag:inbox").count_messages()
|
||||
|
||||
|
||||
if (unread == 0):
|
||||
color = "#00FF00"
|
||||
urgent = "false"
|
Loading…
Reference in New Issue
Block a user