#!/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;