From 09b600b75ad94b82bedc73262797fa88efac4be0 Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Tue, 23 Jul 2024 17:57:36 +0300 Subject: New function: gnosis-dashboard--graph-propertize. * Propertize STRING depending on the NUM of reviews. --- gnosis-dashboard.el | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gnosis-dashboard.el b/gnosis-dashboard.el index 5089fd5..35dbdfe 100644 --- a/gnosis-dashboard.el +++ b/gnosis-dashboard.el @@ -98,6 +98,13 @@ Skips days where no note was reviewed." do (setq total (+ total entry))) (/ total (length (remove 0 entries))))) +;; TODO: Add more conds & faces +(defun gnosis-dashboard--graph-propertize (string num) + "Propertize STRING depending on the NUM of reviews." + (cond ((= num 0) + (propertize string 'face 'shadow)) + ((> num 0) + (propertize string 'face 'font-lock-constant-face)))) (defun gnosis-dashboard-output-note (id) "Output contents for note with ID, formatted for gnosis dashboard." (cl-loop for item in (append (gnosis-select '[main options answer tags type] 'notes `(= id ,id) t) -- cgit v1.2.3