diff options
author | Toby Vincent <tobyv@tobyvin.dev> | 2024-05-28 15:27:15 -0500 |
---|---|---|
committer | Toby Vincent <tobyv@tobyvin.dev> | 2024-05-28 15:27:15 -0500 |
commit | dd6cfb63ad85d0164cbe4ac04f7aea9f6a842f02 (patch) | |
tree | 5bc45394b9192771bcc85fa59b8aab4b8a4301bb /notmuch/.local/bin | |
parent | 1527172edf1f7d65095a5c2268947c16ed905d18 (diff) |
feat!: remove unused configs and cleanup paths
Diffstat (limited to 'notmuch/.local/bin')
-rwxr-xr-x | notmuch/.local/bin/notmuch-notify | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/notmuch/.local/bin/notmuch-notify b/notmuch/.local/bin/notmuch-notify deleted file mode 100755 index bc93f09..0000000 --- a/notmuch/.local/bin/notmuch-notify +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/python - -import notmuch -import subprocess -import os - - -def notify(title, message): - subprocess.Popen( - [ - "notify-send", - "--app-name=notmuch-notify", - "--category=email.arrived", - "--icon=mail-unread", - title, - message, - ] - ) - - -# Workaround for bug in the notmuch module's default config resolution -if os.environ.get("NOTMUCH_CONFIG") is None: - os.environ["NOTMUCH_CONFIG"] = os.path.join( - os.environ.get( - "XDG_CONFIG_HOME", os.path.join(os.path.expanduser("~"), ".config") - ), - "notmuch", - os.environ.get("NOTMUCH_PROFILE", "default"), - "config", - ) - -for message in ( - notmuch.Database( - mode=notmuch.Database.MODE.READ_WRITE, - ) - .create_query("tag:notify") - .search_messages() -): - print(message) - message.remove_tag("notify") - notify(message.get_header("From"), message.get_header("Subject")) - del message |