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

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

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