diff options
author | Marc Coquand <marc@mccd.space> | 2024-11-04 08:39:17 +0200 |
---|---|---|
committer | Marc Coquand <marc@mccd.space> | 2024-11-04 08:39:17 +0200 |
commit | 514bf47c3c3ae79f7a72dd058f70dc01cc7b0e9c (patch) | |
tree | 49493583437cc4acf4974d0f0a97408a61b884d5 /home/dots | |
parent | 031317392f50871ebcd74d746432517d646aed70 (diff) | |
download | guix-514bf47c3c3ae79f7a72dd058f70dc01cc7b0e9c.tar.gz guix-514bf47c3c3ae79f7a72dd058f70dc01cc7b0e9c.tar.bz2 guix-514bf47c3c3ae79f7a72dd058f70dc01cc7b0e9c.zip |
.
Diffstat (limited to '')
-rw-r--r-- | home/dots/.emacs | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/home/dots/.emacs b/home/dots/.emacs index e7f6cc6..2316f72 100644 --- a/home/dots/.emacs +++ b/home/dots/.emacs @@ -798,22 +798,29 @@ :diminish auto-revert-mode) (use-package appt + :after org-agenda :demand t ;; Taken from https://igormelo.org/you_dont_need_org_alert.html ;; Enables notifications for org - :init + :config (setq appt-message-warning-time 15 appt-display-interval 5 - appt-disp-window-function (lambda (remaining new-time msg) - (notifications-notify - :title (message "In %s minutes" remaining) - :body msg - :urgency 'critical))) - (advice-add 'appt-check - :before - (lambda (&rest args) - (let ((inhibit-message t)) - (org-agenda-to-appt t)))) + appt-disp-window-function (lambda (minutes-to now text) + (org-show-notification + (format "Appointment in %s minutes:\n%s" + minutes-to text)))) + + (define-advice appt-activate (:after (&optional _arg) hold-your-horses) + "`appt-activate' is too eager, rein it in." + (remove-hook 'write-file-functions #'appt-update-list) + (when (timerp appt-timer) + (timer-set-time appt-timer (current-time) 600))) + (define-advice appt-check (:before (&optional _force) from-org-agenda) + "Read events from Org agenda if possible." + (and (featurep 'org-agenda) + (ignore-errors + (let ((inhibit-message t)) + (org-agenda-to-appt t))))) (appt-activate t)) (use-package rec-mode |