From 4c9730a6e88f1f0173d9712311f65f348d211f4e Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sat, 4 Apr 2026 15:15:25 -0500 Subject: Bundle multiple day-wide events into a single notification MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When all-day event alert times trigger, multiple events (overdue tasks, birthdays, holidays) previously fired individual notifications — one sound and one popup each. With 8-10 events this was overwhelming. Now multiple day-wide events are bundled into a single notification with all messages joined by newlines. Single events still notify normally without bundling. --- chime.el | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'chime.el') diff --git a/chime.el b/chime.el index ae1078c..708f5a2 100644 --- a/chime.el +++ b/chime.el @@ -1720,8 +1720,16 @@ Handles both regular event notifications and day-wide alerts." (-uniq)) 'chime--notify) (when (chime-current-time-is-day-wide-time) - (mapc 'chime--notify - (chime-day-wide-notifications events)))) + (let ((day-wide (chime-day-wide-notifications events))) + (when day-wide + (if (= 1 (length day-wide)) + ;; Single event: send as normal notification + (chime--notify (car day-wide)) + ;; Multiple events: bundle into one notification, one sound + (let* ((messages (mapcar #'car day-wide)) + (body (mapconcat #'identity messages "\n")) + (title (format "%d day-wide events" (length day-wide)))) + (chime--notify (cons body 'medium)))))))) (defun chime--maybe-warn-persistent-failures () "Warn user if async failures have reached the threshold. -- cgit v1.2.3