diff options
| author | Craig Jennings <c@cjennings.net> | 2026-04-04 15:15:25 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-04-04 15:15:25 -0500 |
| commit | 4c9730a6e88f1f0173d9712311f65f348d211f4e (patch) | |
| tree | 7489f342778f1fda640b6dce90d4a567db71c14f /chime.el | |
| parent | 1067005467d66bbaae5853d2cacda749fb72cbcc (diff) | |
| download | chime-4c9730a6e88f1f0173d9712311f65f348d211f4e.tar.gz chime-4c9730a6e88f1f0173d9712311f65f348d211f4e.zip | |
Bundle multiple day-wide events into a single notification
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.
Diffstat (limited to 'chime.el')
| -rw-r--r-- | chime.el | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -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. |
