From fc039eb654750d6601985c27e7affa8ec0f32813 Mon Sep 17 00:00:00 2001 From: "Kirill A. Korinsky" Date: Wed, 7 Feb 2024 00:39:20 +0100 Subject: [PATCH] Add stumpish Some documentation available here: https://github.com/stumpwm/stumpwm-contrib/tree/master/minor-mode/notifications --- alert.el | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/alert.el b/alert.el index 1b18cc6..db57ec3 100644 --- a/alert.el +++ b/alert.el @@ -136,6 +136,7 @@ ;; toaster - Use the toast notification system ;; x11 - Changes the urgency property of the window in the X Window System ;; termux - Use termux-notification from the Termux API +;; stumpish - Use STUMPwm Interactive SHell (stumpish) to call notifications-add ;; ;; * Defining new styles ;; @@ -1011,6 +1012,19 @@ INFO plist." (alert-define-style 'termux :title "Notify using termux" :notifier #'alert-termux-notify) +(defcustom alert-stumpish-command (executable-find "stumpish") + "Path to the stumpish command." + :type 'file + :group 'alert) + +(defun alert-stumpish-notify (info) + (apply #'call-process alert-stumpish-command nil nil nil + (list "notifications-add" + (alert-encode-string (plist-get info :message)))) + (alert-message-notify info)) + +(alert-define-style 'stumpish :title "Use STUMPwm Interactive SHell (stumpish) to call notifications-add" :notifier #'alert-stumpish-notify) + ;; jww (2011-08-25): Not quite working yet ;;(alert-define-style 'frame :title "Popup buffer in a frame" ;; :notifier #'alert-frame-notify