dotfiles/mutt/.mutt/mailnotify.sh
Sanchayan Maity 7200bbece7 Switch to using stow for dotfiles management
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
2019-12-31 14:18:38 +05:30

15 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