Sanchayan Maity
2b89f36dc5
While at it, add some macros to mutt and clean up shell script with shellcheck. We also stop running imapfilter for anything but our own accounts.
31 lines
787 B
Bash
Executable file
31 lines
787 B
Bash
Executable file
#!/bin/bash
|
|
|
|
export DISPLAY=:0
|
|
|
|
imapfilter -c ~/.imapfilter/config.lua
|
|
|
|
if [ -d "$HOME/Mail/fastmail" ]; then
|
|
mbsync fastmail
|
|
fastmail_inbox=$(find ~/Mail/fastmail/Inbox/new | wc -l)
|
|
if [ "$fastmail_inbox" -gt 1 ]; then
|
|
notify-send "You have $fastmail_inbox new mails in fastmail inbox"
|
|
fi
|
|
fi
|
|
|
|
if [ -d "$HOME/Mail/sanchayan" ]; then
|
|
mbsync gmail
|
|
gmail_inbox=$(find ~/Mail/sanchayan/Inbox/new | wc -l)
|
|
if [ "$gmail_inbox" -gt 1 ]; then
|
|
notify-send "You have $gmail_inbox new mails in gmail inbox"
|
|
fi
|
|
fi
|
|
|
|
if [ -d "$HOME/Mail/asymptotic" ]; then
|
|
mbsync asymptotic
|
|
asymptotic_inbox=$(find ~/Mail/asymptotic/Inbox/new | wc -l)
|
|
if [ "$asymptotic_inbox" -gt 1 ]; then
|
|
notify-send "You have $asymptotic_inbox new mails in asymptotic inbox"
|
|
fi
|
|
fi
|
|
|
|
notmuch new
|