blob: 82035582fdef77c7dab53d2f9b9c261ce1e24c75 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
notmuch new --quiet
notmuch tag -new +unread +jobs -- 'tag:new and (from:jobs-listings* or from:jobs-noreply*)'
notmuch tag -new +unread +dev -- 'tag:new and (from:/.*github.com/ or thread:{from:/.*github.com/})'
# New needs to be removed, otherwise it will re add inbox unread
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/'
notmuch tag --remove-all +sent -- folder:/Sent/
notmuch tag --remove-all +drafts -- folder:/Drafts/
# 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/ or folder:/Junk/
# 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
# TODO(): make this work with non gmail emails too
# notmuch search --output=files -- 'folder:/Inbox/ -tag:inbox' | grep Inbox | xargs >/dev/null 2>&1 rm
# update dwmblocks mail module
pkill -RTMIN+12 dwmblocks
|