#!/usr/bin/env bash count=$(notmuch count tag:inbox and tag:unread) if [[ $count > 0 ]]; then notify-send "New mail" "$count messages" else notify-send "No new mail" fi echo $count exit 0;