#!/usr/bin/env sh prev=$(notmuch count) mbsync -a notmuch new new=$(notmuch count) notify-send "Fetched $(echo $new - $prev | bc -l) mail"