diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/jao-notify.el | 19 | ||||
-rw-r--r-- | sys/jao-osd.el | 9 |
2 files changed, 27 insertions, 1 deletions
diff --git a/sys/jao-notify.el b/sys/jao-notify.el new file mode 100644 index 0000000..f505525 --- /dev/null +++ b/sys/jao-notify.el @@ -0,0 +1,19 @@ +;; jao-notify.el -- Interacting with notification daemon + +;; Copyright (c) 2017 Jose Antonio Ortega Ruiz + +;; Author: Jose Antonio Ortega Ruiz <jao@gnu.org> +;; Start date: Sun Jan 08, 2017 20:24 + + +;;; Comentary: + +;; + +;;; Code: + + + + +(provide 'jao-notify) +;;; jao-notify.el ends here diff --git a/sys/jao-osd.el b/sys/jao-osd.el index 0b2c433..260af44 100644 --- a/sys/jao-osd.el +++ b/sys/jao-osd.el @@ -2,6 +2,7 @@ (defvar jao-osd-cat-color-fg "black") (defvar jao-osd-cat-color-bg "white") (defvar jao-osd-cat-font "Andika Basic 16") +;; (setq jao-osd-cat-font "Inconsolata 20") (defun jao-osd-cat-font (&optional font) (or font jao-osd-cat-font)) @@ -51,5 +52,11 @@ (maphash (lambda (n p) (ignore-errors (kill-process p))) jao-osd-processes) (clrhash jao-osd-processes)) -(provide 'jao-osd) +(defun jao-notify (msg &optional title icon) + (let ((args (if title (format "'%s' '%s'" msg title) (format "'%s'" 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-osd) |