Created
November 26, 2013 19:40
-
-
Save jstewart/7664823 to your computer and use it in GitHub Desktop.
Org-pomodoro notifications for OS X.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Needs terminal-notifier (brew install terminal-notifier) | |
(defun notify-osx (title message) | |
(call-process "terminal-notifier" | |
nil 0 nil | |
"-group" "Emacs" | |
"-title" title | |
"-sender" "org.gnu.Emacs" | |
"-message" message)) | |
;; org-pomodoro mode hooks | |
(add-hook 'org-pomodoro-finished-hook | |
(lambda () | |
(notify-osx "Pomodoro completed!" "Time for a break."))) | |
(add-hook 'org-pomodoro-break-finished-hook | |
(lambda () | |
(notify-osx "Pomodoro Short Break Finished" "Ready for Another?"))) | |
(add-hook 'org-pomodoro-long-break-finished-hook | |
(lambda () | |
(notify-osx "Pomodoro Long Break Finished" "Ready for Another?"))) | |
(add-hook 'org-pomodoro-killed-hook | |
(lambda () | |
(notify-osx "Pomodoro Killed" "One does not simply kill a pomodoro!"))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment