From b116c6fa988f56373c35dd5009f1ad65da7582da Mon Sep 17 00:00:00 2001 From: jao Date: Sat, 27 Mar 2021 02:29:16 +0000 Subject: unused jao-osd gone --- lib/eos/jao-notify.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'lib/eos/jao-notify.el') 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 ;; 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) -- cgit v1.2.3