From 08459c638281892c0d2e843b2720a4c08860406a Mon Sep 17 00:00:00 2001 From: Felix Van der Jeugt Date: Wed, 11 Oct 2017 10:54:31 +0200 Subject: [PATCH] filter before notifying --- notmuch-hooks/post-new | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/notmuch-hooks/post-new b/notmuch-hooks/post-new index 7eb4d6f..b768d63 100755 --- a/notmuch-hooks/post-new +++ b/notmuch-hooks/post-new @@ -1,14 +1,11 @@ #!/bin/sh +# some filtering +notmuch tag +killed -new -- subject:'^[SPAM]' to:ugent + # notify for new messages notmuch search tag:new | cut -d' ' --complement -f1 | xargs -0 --no-run-if-empty notify-send # put new messages in the inbox notmuch tag +inbox -new -- tag:new -# some filtering -notmuch tag +killed -- subject:'^[SPAM]' to:ugent - -# remove killed thread from inbox -notmuch tag -inbox -- tag:killed -