mbsync_notify.sh - dotfiles - These are my dotfiles. There are many like it, but these are mine.
 (HTM) git clone git://jay.scot/dotfiles
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
       ---
       mbsync_notify.sh (235B)
       ---
            1 #!/usr/bin/bash
            2 
            3 maildirnew="$HOME/mail/jay/Inbox/new/"
            4 new="$(find \""$maildirnew"\" -type f | wc -l)"
            5 
            6 export DISPLAY=:0
            7 export XAUTHORITY="$XDG_RUNTIME_DIR"/Xauthority
            8 
            9 if [ "$new" -gt 0 ]
           10 then
           11   notify-send "New mail: \"$new\""
           12 fi