summaryrefslogtreecommitdiff
path: root/offlineimap-notification
blob: eeecff00c46fef9b073900b5fecfce7ee06d0f39 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/zsh

new="$(find $HOME/.mail/*/inbox/new/ -type f | wc -l)"
old="$(find $HOME/.mail/*/inbox/cur/ -type f | wc -l)"

if [ $new -gt 0 ]
then
  export DISPLAY=:0; export XAUTHORITY=~/.Xauthority;
  notify-send "You've got mail."
fi