summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--sys/jao-notify.el12
-rw-r--r--sys/jao-osd.el9
2 files changed, 10 insertions, 11 deletions
diff --git a/sys/jao-notify.el b/sys/jao-notify.el
index f505525..fdffe5e 100644
--- a/sys/jao-notify.el
+++ b/sys/jao-notify.el
@@ -1,6 +1,6 @@
;; jao-notify.el -- Interacting with notification daemon
-;; Copyright (c) 2017 Jose Antonio Ortega Ruiz
+;; Copyright (c) 2017, 2019 Jose Antonio Ortega Ruiz
;; Author: Jose Antonio Ortega Ruiz <jao@gnu.org>
;; Start date: Sun Jan 08, 2017 20:24
@@ -8,10 +8,18 @@
;;; 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))))
diff --git a/sys/jao-osd.el b/sys/jao-osd.el
index 5e70b79..acdc629 100644
--- a/sys/jao-osd.el
+++ b/sys/jao-osd.el
@@ -52,13 +52,4 @@
(maphash (lambda (n p) (ignore-errors (kill-process p))) jao-osd-processes)
(clrhash jao-osd-processes))
-(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-osd)