mu4e: add support for macos notifications

The current order in this patch is

1) macos notification
2) built-in dbus notification
3) fallback text notification

because macOS emacs can actually have dbus enabled (for emacs daemon
mode) but that doesn't support notifications. This is a built-in way to
send a simple notification for macs, too. Yay!
This commit is contained in:
Sean Farley 2023-12-18 13:47:43 -08:00 committed by Dirk-Jan C. Binnema
parent dd51f5aa12
commit b222a8a3f5
1 changed files with 3 additions and 0 deletions

View File

@ -67,6 +67,9 @@ support."
(if (= delta-unread 1) "" "s")
(plist-get fav :name))))
(cond
((fboundp 'do-applescript)
(do-applescript
(format "display notification %S with title %S" body title)))
((fboundp 'notifications-notify)
;; notifications available
(setq mu4e--notification-id