#! /usr/bin/env bash export DISPLAY=:0 mbsync -a nmails=$(find $HOME/.mail -path '*/new/*' -type f | wc -l) [[ nmails -ge 1 ]] && /usr/bin/notify-send -t 1 "New mail!" || /usr/bin/notify-send -u low -t 1 "No new mail!" echo "Email last checked on $(date)".