summaryrefslogtreecommitdiff
path: root/gnosis-dashboard.el
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2024-07-23 17:57:36 +0300
committerThanos Apollo <[email protected]>2024-07-23 18:36:15 +0300
commit09b600b75ad94b82bedc73262797fa88efac4be0 (patch)
tree5982bc7e35b74bdb37a081ecbc27d88aabc2379a /gnosis-dashboard.el
parenta6d7ef539ae3a289ab83c61cba5d1ff7c307b928 (diff)
New function: gnosis-dashboard--graph-propertize.
* Propertize STRING depending on the NUM of reviews.
Diffstat (limited to 'gnosis-dashboard.el')
-rw-r--r--gnosis-dashboard.el7
1 files changed, 7 insertions, 0 deletions
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)