diff options
| author | Mike Vink <mike1994vink@gmail.com> | 2023-10-06 23:10:55 +0200 |
|---|---|---|
| committer | Mike Vink <mike1994vink@gmail.com> | 2023-10-06 23:10:55 +0200 |
| commit | cfaef26e8718916adcc68fbfb63b15f2389b2cd2 (patch) | |
| tree | 3989af4514d31d0a5cb89e8b96d51210ad7bf152 /mut/bin/notmuch-hook | |
| parent | 654ec06ab6a885ea851c4cbf68d06a00b41b0e14 (diff) | |
move all the files
Diffstat (limited to 'mut/bin/notmuch-hook')
| -rw-r--r-- | mut/bin/notmuch-hook | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/mut/bin/notmuch-hook b/mut/bin/notmuch-hook new file mode 100644 index 0000000..da376b6 --- /dev/null +++ b/mut/bin/notmuch-hook @@ -0,0 +1,17 @@ +. <(pass show personal/notmuch) +notmuch new --quiet +notmuch tag -new +unread +jobs -- 'tag:new and (from:jobs-listings* or from:jobs-noreply*)' +notmuch tag -new +unread +houses -- 'tag:new and (from:"'$MAKELAAR'" or thread:{'$MAKELAAR'})' +notmuch tag -new -inbox +unread +dev -- 'tag:new and (from:/.*github.com/ or thread:{from:/.*github.com/})' + +notmuch tag -new +inbox +unread -- tag:new + +# Gmail + mbsync = a lot of duplicates due to the archive +notmuch tag -new -inbox +archive -- 'folder:/Archive/ -folder:/Inbox/ -folder:/\[Gmail\]/ -folder:/FarDrafts/ -folder:/Important/ -folder:/Sent/' + +# Tag messages with files that were moved to trash in neomutt +notmuch tag --remove-all +trash -- folder:/Trash/ +# Same but with messages with files that were moved to spam +notmuch tag --remove-all +spam -- folder:/Spam/ +# Remove files of messages that were tagged but still have files left behind in the mailbox, should be fine since gmail already keeps a duplicate in the Archive so the message will not be deleted only one file of the message +notmuch search --output=files -- 'folder:/Inbox/ -tag:inbox' | grep Inbox | xargs >/dev/null 2>&1 rm |
