From a84cf8bdd7ab499e63c223e0053e50291f3e496c Mon Sep 17 00:00:00 2001 From: cspark Date: Wed, 4 Mar 2026 20:41:25 +0000 Subject: [PATCH] Desktop notifications for agenda alerts --- init.el | 50 +++++++++++++++++++++++++++----------------------- 1 file changed, 27 insertions(+), 23 deletions(-) diff --git a/init.el b/init.el index 642e065..cfa651b 100644 --- a/init.el +++ b/init.el @@ -186,8 +186,8 @@ :ensure (:host github :repo "ArthurHeymans/emacs-tramp-rpc") :after tramp :config - (setq tramp-rpc-deploy-local-cache-directory - "~/.cache/emacs/tramp-rpc-binaries")) + (setq tramp-rpc-deploy-local-cache-directory + "~/.cache/emacs/tramp-rpc-binaries")) ;; Org Mode Config ;Agenda @@ -198,19 +198,19 @@ :hook (org-agenda-mode . (lambda() (org-agenda-entry-text-mode 1))) :config - (setq org-agenda-files '("~/Nextcloud/Agenda")) - ;This is will integrate the Calendar/Diary into Org-Agenda, so you can get access to dates on public holidays etc. Set diary to true: - (setq org-agenda-include-diary t) - ;Ensure done date/closed timestamps are logged - (setq org-log-done 'time) - ;Ensure state changes are logged into logbook - (setq org-log-into-drawer "LOGBOOK") + (setq org-agenda-files '("~/Nextcloud/Agenda")) + ;This is will integrate the Calendar/Diary into Org-Agenda, so you can get access to dates on public holidays etc. Set diary to true: + (setq org-agenda-include-diary t) + ;Ensure done date/closed timestamps are logged + (setq org-log-done 'time) + ;Ensure state changes are logged into logbook + (setq org-log-into-drawer "LOGBOOK") - ;Ensure agenda still shows DONE items - (setq org-agenda-skip-scheduled-if-done nil) - (setq agenda-skip-deadline-if-done nil) - - (setq org-startup-folded t) + ;Ensure agenda still shows DONE items + (setq org-agenda-skip-scheduled-if-done nil) + (setq agenda-skip-deadline-if-done nil) + + (setq org-startup-folded t) ) ; For Org Pomodoro notification sound @@ -223,11 +223,11 @@ :after org :defer t :config - (setq org-pomodoro-manual-break t) - (setq org-pomodoro-keep-killed-pomodoro-time t) - (setq org-pomodoro-play-sounds t) - (setq org-pomodoro-ticking-sound-p nil) - (setq org-pomodoro-audio-player "mpv") + (setq org-pomodoro-manual-break t) + (setq org-pomodoro-keep-killed-pomodoro-time t) + (setq org-pomodoro-play-sounds t) + (setq org-pomodoro-ticking-sound-p nil) + (setq org-pomodoro-audio-player "mpv") ) (defun sound-alert (alert) "Play a sound notification and show message ALERT." @@ -247,6 +247,9 @@ :notifier (lambda (info) ; 'info' is a plist containing :title, :message, :severity, etc. + (notifications-notify + :title "Emacs Alert" + :body (plist-get info :message)) (sound-alert (concat "ORG ALERT: " ;(plist-get info :title) (plist-get info :message))))) @@ -274,10 +277,11 @@ ; Upcoming agenda items in modeline (use-package org-upcoming-modeline - :ensure t - :after org ; if you don't want it to start until org has been loaded - :config - (org-upcoming-modeline-mode)) + :ensure t + :after org ; if you don't want it to start until org has been loaded + :config + (org-upcoming-modeline-mode) +) ; Org Mode Journalling (use-package org-journal