[Emacs] Use org-wild-notifier

This commit is contained in:
Ivan Malison 2023-08-29 19:04:12 -06:00
parent 6f196c8c86
commit 3eed03beb7

View File

@ -184,6 +184,14 @@ We're going to use this to write separate parts of our config to different secti
(org-priority-down))) (org-priority-down)))
nil nil
'agenda)) 'agenda))
(cl-defun imalison:org-at-time (&optional time &key (fn 'org-wild-notifier-check))
(interactive)
(setq time (or time (time-convert (encode-time (parse-time-string (org-read-date))) 'list)))
(message "%s" time)
(flet
((current-time (&rest args) time))
(funcall fn)))
#+end_src #+end_src
** Miscellaneous ** Miscellaneous
#+begin_src emacs-lisp :tangle org-config-config.el #+begin_src emacs-lisp :tangle org-config-config.el
@ -838,38 +846,27 @@ alphanumeric characters only."
(org-roam-ui-update-on-save t) (org-roam-ui-update-on-save t)
(org-roam-ui-open-on-start nil)) (org-roam-ui-open-on-start nil))
#+end_src #+end_src
** org-notify ** org-wild-notifier
#+BEGIN_SRC emacs-lisp #+begin_src emacs-lisp
(use-package org-notify (use-package org-wild-notifier
:after org :after org
:custom
((org-wild-notifier-keyword-whitelist nil)
(org-wild-notifier-tags-blacklist '("nonotify")))
:config :config
(progn (org-wild-notifier-mode +1)
(defun org-wild-notify-check-at-time ()
(setq org-show-notification-handler 'org-notify-action-notify) (interactive)
(imalison:org-at-time
(org-notify-add 'default nil
'(:time "0s" :fn (lambda ()
:period "2m" :duration 60)) (-each
(org-notify-add 'urgent-second '(:time "3m" :actions (-notify/window -ding) (->> (funcall (org-wild-notifier--retrieve-events))
:period "15s" :duration 10)) (-map 'org-wild-notifier--check-event)
(org-notify-add 'minute '(:time "5m" :actions -notify/window (-flatten)
:period "100s" :duration 70)) (-uniq))
(org-notify-add '12hours 'org-wild-notifier--notify)))))
'(:time "3m" :actions (-notify/window -ding) #+end_src
:period "15s" :duration 10)
'(:time "100m" :actions -notify/window
:period "2m" :duration 60)
'(:time "12h" :actions -notify/window :audible nil
:period "10m" :duration 200))
(org-notify-add '5days
'(:time "100m" :actions -notify/window
:period "2m" :duration 60)
'(:time "2d" :actions -notify/window
:period "15m" :duration 100)
'(:time "5d" :actions -notify/window
:period "2h" :duration 200))
(org-notify-start 10)))
#+END_SRC
** org-reveal ** org-reveal
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package ox-reveal (use-package ox-reveal