mirror of
https://github.com/vincentbernat/i3wm-configuration.git
synced 2025-07-03 06:44:21 +02:00
thunderbird: do not display notifications for read messages
This commit is contained in:
parent
af4d1bd738
commit
1e67f3d0e8
1 changed files with 4 additions and 1 deletions
|
@ -98,7 +98,10 @@ def notify_new_messages(path):
|
|||
subject = parsed.get("subject")
|
||||
author = parsed.get("from")
|
||||
messageid = parsed.get("message-id")
|
||||
if subject is not None and author is not None:
|
||||
# https://vincent.bernat.ch/en/x-mozilla-status
|
||||
status = parsed.get("x-mozilla-status")
|
||||
status = int(status) & 0x1 if status else 0
|
||||
if subject is not None and author is not None and status == 0:
|
||||
actions = [] if messageid is None else [messageid.strip("<>"), "Open"]
|
||||
notify.Notify(
|
||||
"Thunderbird",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue