-
Notifications
You must be signed in to change notification settings - Fork 0
/
init-growl.el
20 lines (16 loc) · 942 Bytes
/
init-growl.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
(require 'todochiku) ;; growl notifications when compilation finishes
(setq todochiku-icons-directory (expand-file-name "~/.emacs.d/site-lisp/todochiku-icons"))
(defcustom terminal-notifier-path
"/Applications/terminal-notifier.app/Contents/MacOS/terminal-notifier"
"Path to the terminal-notifier app for Mountain Lion, if installed.
See https://github.com/alloy/terminal-notifier for more information.")
(when (and *is-a-mac* (file-executable-p terminal-notifier-path))
(defadvice todochiku-get-arguments (around todochiku-terminal-notifier activate)
(setq ad-return-value
(list "-title" title "-message" message "-activate" "org.gnu.Emacs")))
(setq todochiku-command terminal-notifier-path))
(defadvice todochiku-message (around check-for-helper activate)
"Suppress message attempts when the `todochiku-command' program is missing."
(when (file-exists-p todochiku-command)
ad-do-it))
(provide 'init-growl)