Table of Contents
1 Enable ERC notifications on macOS
A quick post on how to enable ERC notification on macOS via Notification Center using AppleScript:
;; Send notification using Apple Script on macOS (defun galactic-emacs-erc-ns-notify (nick msg &optional PRIVP) "Notify that NICK send a MSG using Apple Notification Center" (ns-do-applescript (concat "display notification \"" nick " wrote: " msg "\"" "with title" "\"ERC Notification\""))) ;; Desktop notifications (require 'erc-desktop-notifications) (erc-notifications-enable) ;; Use Notification Center on macOS (when (string= system-type "darwin") (advice-add 'erc-notifications-notify :after #'galactic-emacs-erc-ns-notify))
2 Useful Links
2.1 Apple Script
2.2 ERC Notifications
2.3 Elisp examples
(ns-do-applescript "display notification \"hello world\"")
No comments:
Post a Comment