Skip to content

Instantly share code, notes, and snippets.

@GeauxEric
Created May 26, 2016 04:02
Show Gist options
  • Save GeauxEric/b89d88bddecdfe47bf929116f3be9520 to your computer and use it in GitHub Desktop.
Save GeauxEric/b89d88bddecdfe47bf929116f3be9520 to your computer and use it in GitHub Desktop.
notification pop-up from org-agenda on Mac OSX
;; notification from org-agenda
;; brew install terminal-notifier
(defun djcb-popup (title msg &optional)
"Show a popup with the msg and the sound"
(interactive)
(shell-command (concat "terminal-notifier -message "
" '" msg "' "
"-title "
" '"title"' "
))
(message (concat title ": " msg))
)
(setq appt-message-warning-time 10)
(appt-activate 1)
(add-hook 'org-finalize-agenda-hook 'org-agenda-to-appt)
(defun djcb-appt-display (min-to-app new-time msg)
(djcb-popup (format "Appointment in %s minute(s)" min-to-app) msg))
(setq appt-disp-window-function (function djcb-appt-display))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment