summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Cunningham <cc@localhost>2024-06-14 17:49:59 -0700
committerChristian Cunningham <cc@localhost>2024-06-14 17:49:59 -0700
commitf919e38f69e2183f9a41d1039fbae90864b66899 (patch)
tree32c7d50e4144d8d8c8fbb625d2fdd054f7b5d9c9
parent14709c6a53c3ab9e05072fb478405cff28ca1922 (diff)
Motivational Messages
-rw-r--r--elchemy-dashboard.el12
1 files 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")