dotfiles/mutt/mailnotify.sh
Sanchayan Maity babc2bb780 Update mail related configuration
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
2018-11-23 23:10:37 +05:30

14 lines
331 B
Bash
Executable file

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