diff options
author | Jose Antonio Ortega Ruiz <jao@imladris.local> | 2017-06-14 02:21:28 +0200 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@imladris.local> | 2017-06-14 02:21:28 +0200 |
commit | fa0edc1a86584a6758d8b453ca77fd92340fced6 (patch) | |
tree | 1dee058c0b517cf76f3cc6105d7e28104c41eed7 /sys | |
parent | ec9adfba23a9dbfe1e617d7a002ea5c73f1ca82f (diff) | |
download | elibs-fa0edc1a86584a6758d8b453ca77fd92340fced6.tar.gz elibs-fa0edc1a86584a6758d8b453ca77fd92340fced6.tar.bz2 |
new jao-notify with libnotify
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) |