summaryrefslogtreecommitdiff
path: root/home/dots/mail/.notmuch/hooks/pre-new
blob: 949d9099dc2f7b5e3201621d9c88dd45d7b59a4f (plain)
1
2
3
4
5
6
7
8
#!/run/current-system/profile/bin/bash
notmuch search --output=files "path:/.*/INBOX/" tag:home and tag:deleted | while IFS= read -r f; do mv -v $f $(echo $f | sed 's/INBOX/Trash/' | sed 's/,U=[0-9]*:/:/'); done 

notmuch search --output=files "path:/.*/INBOX/" tag:home and tag:receipt and not tag:inbox | while IFS= read -r f; do mv -v $f $(echo $f | sed 's/INBOX/Archive\/Receipt/' | sed 's/,U=[0-9]*:/:/'); done 

notmuch search --output=files "path:/.*/INBOX/" tag:home and tag:flight and not tag:inbox | while IFS= read -r f; do mv -v $f $(echo $f | sed 's/INBOX/Archive\/Flight/' | sed 's/,U=[0-9]*:/:/'); done 

notmuch search --output=files "path:/.*/INBOX/" tag:home and not tag:inbox | while IFS= read -r f; do mv -v $f $(echo $f | sed 's/INBOX/Archive/' | sed 's/,U=[0-9]*:/:/'); done