summaryrefslogtreecommitdiffhomepage
path: root/lib/eos/jao-notify.el
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2021-03-27 02:29:16 +0000
committerjao <jao@gnu.org>2021-03-27 02:29:16 +0000
commitb116c6fa988f56373c35dd5009f1ad65da7582da (patch)
tree22894d2416962a3539bbe1347fc5801ee48079eb /lib/eos/jao-notify.el
parente489030b12bdaf153e48ed0c1f82d7393751ffc7 (diff)
downloadelibs-b116c6fa988f56373c35dd5009f1ad65da7582da.tar.gz
elibs-b116c6fa988f56373c35dd5009f1ad65da7582da.tar.bz2
unused jao-osd gone
Diffstat (limited to 'lib/eos/jao-notify.el')
-rw-r--r--lib/eos/jao-notify.el9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/eos/jao-notify.el b/lib/eos/jao-notify.el
index dc48ca4..5e7e627 100644
--- a/lib/eos/jao-notify.el
+++ b/lib/eos/jao-notify.el
@@ -1,6 +1,6 @@
;; jao-notify.el -- Interacting with notification daemon
-;; Copyright (c) 2017, 2019, 2020 Jose Antonio Ortega Ruiz
+;; Copyright (c) 2017, 2019, 2020, 2021 Jose Antonio Ortega Ruiz
;; Author: Jose Antonio Ortega Ruiz <jao@gnu.org>
;; Start date: Sun Jan 08, 2017 20:24
@@ -18,15 +18,16 @@
(declare-function notifications-notify "notifications")
(defun jao-notify (msg &optional title icon)
- (if jao-notify-use-messages-p
- (message "%s%s%s" (or title "") (if title ": " "") (or msg ""))
+ (let ((title (when (and title (not (string-blank-p title))) title)))
+ (if jao-notify-use-messages-p
+ (message "%s%s%s" (or title "") (if title ": " "") (or msg ""))
(let* ((args `(:timeout ,jao-notify-timeout))
(args (append args
(if title `(:title ,title :body ,msg) `(:title ,msg))))
(args (if (and (stringp icon) (file-exists-p icon))
(append args `(:app-icon ,(format "%s" icon)))
args)))
- (apply 'notifications-notify args))))
+ (apply 'notifications-notify args)))))
(provide 'jao-notify)