From f29a263ba25914e2a3214bb41d87444958d94661 Mon Sep 17 00:00:00 2001 From: MitchMarq42 Date: Fri, 7 Apr 2023 09:16:10 -0800 Subject: [PATCH] optionally tail the echo-area message, and put it on a timer --- notibox.el | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/notibox.el b/notibox.el index 8d58736..d68155e 100644 --- a/notibox.el +++ b/notibox.el @@ -91,8 +91,21 @@ (notibox--hide (car notibox-current-posframes)) (pop notibox-current-posframes)) +(defun notibox--tail-echoarea () + (if (current-message) + (notibox-alert `( + :title ,(format "%s" (current-buffer)) + :message ,(current-message))) + (notibox-delete 'current))) + +(defun notibox/setup-timer () + (interactive) + (run-with-timer 1 0.5 #'notibox--tail-echoarea)) ;; (notibox--hide 'anything) +(defun notibox-test-alert () + (interactive) + (notibox-alert '(:title "five" :message "six"))) (provide 'notibox) ;;; notibox.el ends here