diff --git a/i3pystatus/__main__.py.dist b/i3pystatus/__main__.py.dist index 1db9380..bd27f2b 100755 --- a/i3pystatus/__main__.py.dist +++ b/i3pystatus/__main__.py.dist @@ -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) diff --git a/i3pystatus/notmuch.py b/i3pystatus/notmuchmail.py similarity index 97% rename from i3pystatus/notmuch.py rename to i3pystatus/notmuchmail.py index 99ff26d..ccf7032 100644 --- a/i3pystatus/notmuch.py +++ b/i3pystatus/notmuchmail.py @@ -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"