1 2 3 4 5 6 7 8 9 10
#!/usr/bin/env bash count=$(notmuch count tag:new) case "$1" in -n) [[ $count > 0 ]] && notify-send "New mail" "$count messages" ;; *) echo $count ;; esac exit 0;