aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2024-10-02 17:44:55 +0200
committerFlorian Fischer <florian.fischer@muhq.space>2024-10-02 17:46:06 +0200
commita95618a2da63a8aca13fbd780d9ae8a386801e75 (patch)
tree8652b4343af971ecb51c66f7d1a7829b4b15bedb
parent8ce1060681ec0f36dec6ba06396ec13d91610aa9 (diff)
downloaddotfiles-a95618a2da63a8aca13fbd780d9ae8a386801e75.tar.gz
dotfiles-a95618a2da63a8aca13fbd780d9ae8a386801e75.zip
notmuch: move config to $XDG_CONFIG_HOME/notmuch
Add a notification for new mails and tag them.
-rw-r--r--config/notmuch/config (renamed from notmuch-config)7
-rwxr-xr-xconfig/notmuch/hooks/post-new3
-rw-r--r--config/notmuch/queries2
-rwxr-xr-xsetup.py2
4 files changed, 12 insertions, 2 deletions
diff --git a/notmuch-config b/config/notmuch/config
index 4581deb..2bf7049 100644
--- a/notmuch-config
+++ b/config/notmuch/config
@@ -12,6 +12,7 @@
#
[database]
path=/home/muhq/.local/share/maildir/
+hook_dir=/home/muhq/.config/notmuch/hooks/
# User configuration
#
@@ -31,7 +32,7 @@ path=/home/muhq/.local/share/maildir/
[user]
name=Florian Fischer
primary_email=florian.fischer@muhq.space
-other_email=florian.fl.fischer@fau.de;f.fischer@cs.fau.de;
+other_email=florian.fl.fischer@fau.de;f.fischer@cs.fau.de;florian.fischer@hans-sachs-gymnasium.de;jesus@supernovafickmichtot.de;florian.fischer@vocosma.it;
# Configuration for "notmuch new"
#
@@ -48,6 +49,8 @@ other_email=florian.fl.fischer@fau.de;f.fischer@cs.fau.de;
# in the mail store.
#
[new]
+tags=new
+ignore=Spam
# Search configuration
#
@@ -59,6 +62,7 @@ other_email=florian.fl.fischer@fau.de;f.fischer@cs.fau.de;
# query will override that exclusion.
#
[search]
+exclude_tags=spam
# Maildir compatibility configuration
#
@@ -82,3 +86,4 @@ other_email=florian.fl.fischer@fau.de;f.fischer@cs.fau.de;
# commands will notice tag changes and update flags in filenames
#
[maildir]
+synchronize_flags = true
diff --git a/config/notmuch/hooks/post-new b/config/notmuch/hooks/post-new
new file mode 100755
index 0000000..05250e4
--- /dev/null
+++ b/config/notmuch/hooks/post-new
@@ -0,0 +1,3 @@
+#!/bin/sh
+test $(notmuch search tag:new | wc -l) -gt 0 && notify-send notmuch "new mail"
+notmuch tag -new tag:new
diff --git a/config/notmuch/queries b/config/notmuch/queries
new file mode 100644
index 0000000..a49733b
--- /dev/null
+++ b/config/notmuch/queries
@@ -0,0 +1,2 @@
+personal=tag:unread and folder:/.*/INBOX/
+unread=tag:unread
diff --git a/setup.py b/setup.py
index 802e992..01c2559 100755
--- a/setup.py
+++ b/setup.py
@@ -118,7 +118,7 @@ targets = {
"mutt": mutt_target,
"neomutt": mutt_target,
"notmuch":
- [("notmuch-config", home_dir + "/.notmuch-config")],
+ [("config/notmuch", config_dir + "/notmuch")],
"qutebrowser":
[("config/qutebrowser/config.py", config_dir + "/qutebrowser/config.py"),
("config/qutebrowser/dark.py", config_dir + "/qutebrowser/theme.py"), # default theme