Created
October 7, 2017 09:06
-
-
Save guiniol/8dd87d93c554f425e6f3995e97e495db to your computer and use it in GitHub Desktop.
fetch mail and apply tags
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
mbsync -Va | |
notmuch new --try-decrypt | |
notmuch tag +neomutt-devel folder:neomutt and tag:tofilter and to:neomutt-devel | |
notmuch tag +neomutt-users folder:neomutt and tag:tofilter and to:neomutt-users | |
notmuch tag +github-issues folder:neomutt and tag:tofilter and from:github.com | |
notmuch tag +vim folder:neomutt and tag:tofilter and 'subject:[vim' | |
notmuch tag +vim folder:neomutt and tag:tofilter and to:vim-dev | |
notmuch tag +vim folder:neomutt and tag:tofilter and to:vim_dev | |
notmuch tag -tofilter tag:tofilter and from:[email protected] | |
COUNT=$(notmuch count tag:tofilter and tag:unread) | |
notmuch tag -tofilter tag:tofilter | |
if [ ${COUNT} != 0 ]; then | |
notify-send -h 'MAIL MOTHERFUCKER !!' "${COUNT} new messages" | |
mpv ~/.config/mutt/mail_motherfucker.m4a >/dev/null 2>&1 | |
fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment