Dont send org notify on 'PROGRESS'

This commit is contained in:
Marco Thomas
2022-05-23 23:57:39 +02:00
parent 9e0589a9cf
commit dffc83c77e
3 changed files with 23 additions and 1 deletions

View File

@@ -586,6 +586,22 @@ I need my =hjkl= :(
:straight t
:config
(setq alert-default-style 'libnotify)
(defun org-alert--parse-entry ()
"Parse an entry from the org agenda and return a list of the heading and the scheduled/deadline time"
(let ((head (org-alert--strip-text-properties (org-get-heading t t t t)))
(body (org-alert--grab-subtree))
(todo (org-get-todo-state)))
(string-match org-alert-time-match-string body)
(list head (match-string 1 body) todo)))
(defun org-alert--dispatch ()
(let* ((entry (org-alert--parse-entry))
(head (car entry))
(time (cadr entry))
(todo (cadr (cdr entry))))
(if time
(when (and (string= todo "TODO") (org-alert--check-time time))
(alert (concat time ": " head) :title org-alert-notification-title))
(alert head :title org-alert-notification-title))))
(org-alert-enable))
#+end_src