forked from purcell/emacs.d
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init-growl.el
23 lines (18 loc) · 988 Bytes
/
init-growl.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
(require-package 'todochiku)
(require 'todochiku) ;; growl notifications when compilation finishes
(setq todochiku-icons-directory
(expand-file-name "site-lisp/todochiku-icons" user-emacs-directory))
(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)