;; jao-notify.el -- Interacting with notification daemon ;; Copyright (c) 2017, 2019 Jose Antonio Ortega Ruiz ;; Author: Jose Antonio Ortega Ruiz ;; Start date: Sun Jan 08, 2017 20:24 ;;; Comentary: ;; Simple notifications using notify-send ;;; Code: (defun jao-notify (msg &optional title icon) (let* ((title (shell-quote-argument title)) (msg (shell-quote-argument msg)) (args (if title (format "%s %s" msg title) msg)) (iflag (if (and (stringp icon) (file-exists-p icon)) (format " -i %s" icon) ""))) (shell-command-to-string (format "notify-send %s%s" args iflag)))) (provide 'jao-notify) ;;; jao-notify.el ends here