From f919e38f69e2183f9a41d1039fbae90864b66899 Mon Sep 17 00:00:00 2001 From: Christian Cunningham Date: Fri, 14 Jun 2024 17:49:59 -0700 Subject: Motivational Messages --- elchemy-dashboard.el | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/elchemy-dashboard.el b/elchemy-dashboard.el index 721109f..fe91017 100644 --- a/elchemy-dashboard.el +++ b/elchemy-dashboard.el @@ -58,14 +58,22 @@ (add-text-properties start (point) `(face (:height ,elchemy/dashboard/subheader-size)))) (insert "\n") - (insert (elchemy/format-processed-agenda (mapcar 'elchemy/process-agenda-heading (org-ql-select (org-agenda-files) `(and (todo "STRT" "WAIT" "TODO" "CYCL") (ts :from ,(- elchemy/schedule-lookahead) :to today)) :sort '(todo priority date))))) + (setq overdue-s (elchemy/format-processed-agenda (mapcar 'elchemy/process-agenda-heading (org-ql-select (org-agenda-files) `(and (todo "STRT" "WAIT" "TODO" "CYCL") (ts :from ,(- elchemy/schedule-lookahead) :to today)) :sort '(todo priority date))))) + (if (eq (length overdue-s) 0) + (insert "Yay, nothing here!\n") + (insert overdue-s)) (insert "\n") (let ((start (point))) (insert "Upcoming") (add-text-properties start (point) `(face (:height ,elchemy/dashboard/subheader-size)))) (insert "\n") - (insert (elchemy/format-processed-agenda (mapcar 'elchemy/process-agenda-heading (org-ql-select (org-agenda-files) `(and (todo "STRT" "WAIT" "TODO" "CYCL") (ts :from today :to ,elchemy/schedule-lookahead)) :sort '(todo priority date))))) + (setq upcoming-s (elchemy/format-processed-agenda (mapcar 'elchemy/process-agenda-heading (org-ql-select (org-agenda-files) `(and (todo "STRT" "WAIT" "TODO" "CYCL") (ts :from today :to ,elchemy/schedule-lookahead)) :sort '(todo priority date))))) + (if (eq (length upcoming-s) 0) + (if (eq (length overdue-s) 0) + (insert "You are free!\n") + (insert "Time to work on that backlog!\n")) + (insert upcoming-s)) (insert "\n")) (insert (buttonize "Refresh" '(lambda (x) (elchemy/recreate-dashboard)))) (insert "\n") -- cgit v1.2.1