Permalink
Browse files

use mountain lion notification center in erc rather than growl

  • Loading branch information...
1 parent d362ac0 commit 41f21db15cce4b0b9af5be550afb9bb42d664350 @langmartin committed Sep 13, 2012
Showing with 9 additions and 1 deletion.
  1. +9 −1 rc-erc.el
View
@@ -78,11 +78,19 @@
(lambda (nick ip reason)
(erc-log-save-all-buffers)))
+(defun notification-center (title message)
+ (start-process "terminal-notifier"
+ "*terminal-notifier*"
+ "/Applications/terminal-notifier.app/Contents/MacOS/terminal-notifier"
+ "-title" title
+ "-message" message
+ "-activate" "org.gnu.Emacs"))
+
(defun erc-growl-hook (match-type nick message)
"Shows a growl notification, when user's nick was mentioned. If the buffer is currently not visible, makes it sticky."
(when (eq match-type 'current-nick)
(unless (posix-string-match "^\\** *Users on #" message)
- (growl
+ (notification-center
(concat "ERC " (buffer-name (current-buffer)))
message))))

0 comments on commit 41f21db

Please sign in to comment.