dotfiles/mutt/mailnotify.sh

15 lines
331 B
Bash
Raw Normal View History

2016-03-07 17:31:28 +01:00
#!/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`
2016-03-07 17:31:28 +01:00
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"
2016-03-07 17:31:28 +01:00
fi