dotfiles/mutt/.mutt/mailnotify.sh
Sanchayan Maity ae310a18f7 Update all mail related configs
1. Use app password for gmail accounts
2. Add nilenso account to mutt, imapfilter, mbsync, msmtp

Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
2020-01-06 10:55:00 +05:30

16 lines
558 B
Bash
Executable file

#!/bin/bash
imapfilter -c ~/.imapfilter/config.lua
mbsync -a
notmuch new
export DISPLAY=:0
let inbox=`ls /home/core/Gmail/sanchayan/Inbox/new/|wc -l`
let nilenso_inbox=`ls /home/core/Gmail/nilenso/Inbox/new/|wc -l`
if (("$inbox" > 0) || ("$nilenso_inbox" > 0)); then
sudo -u core DISPLAY=:0 DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus notify-send "You have $inbox new mails in inbox"
sudo -u core DISPLAY=:0 DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus notify-send "You have $nilenso_inbox new mails in Nilenso inbox"
fi