sleep 1s && tput bel inside iTerm and quickly tabbing out into another application displays this very nice notification badge in the Dock:
I tried running
(shell-command "sleep 1s && tput bel") or calling something like
echo -e "\a", but there is no audible beep or that nice Dock badge. It just displays
I am interested in using this badge for new emails, linking it into mu4e-alert as a subtle way to notify me because I don't want to use the full-size notifications provided by something like
terminal-notifier -message "New email...".
Does anyone know of other ways how I could get this badge to appear? I especially like the integration into macOS that the badge goes away on its own when the application is launched into its foreground.
I also tried the built-in
(beep) and it beeps, but does not display the Dock badge when Emacs is not in focus:
(sleep-for 2) (beep)