From 4429f48ffa5083a5491ee36b5aefa046ee60cb67 Mon Sep 17 00:00:00 2001 From: Giancarlo Razzolini Date: Fri, 28 Mar 2025 10:41:37 -0300 Subject: [PATCH] Implement notmuch2 on notmuch mail backend --- i3pystatus/mail/notmuchmail.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/i3pystatus/mail/notmuchmail.py b/i3pystatus/mail/notmuchmail.py index dc8988e5..f05b346a 100644 --- a/i3pystatus/mail/notmuchmail.py +++ b/i3pystatus/mail/notmuchmail.py @@ -1,6 +1,6 @@ # note that this needs the notmuch python bindings. For more info see: # http://notmuchmail.org/howto/#index4h2 -import notmuch +import notmuch2 import configparser import os from i3pystatus.mail import Backend @@ -36,8 +36,8 @@ def init(self): @property def unread(self): - db = notmuch.Database(self.db_path) - result = notmuch.Query(db, self.query).count_messages() + db = notmuch2.Database(self.db_path) + result = db.count_messages(self.query) db.close() return result