Make every part of the output configurable with user defined functions #5
@ -66,7 +66,9 @@
|
||||
|
||||
(defsubst org-clock-waybar-get-task-title ()
|
||||
"Get the title of TASK."
|
||||
(when (org-clocking-p) (substring-no-properties org-clock-current-task)))
|
||||
(if (org-clocking-p)
|
||||
(substring-no-properties org-clock-current-task)
|
||||
org-clock-waybar-not-clocked-in-text))
|
||||
|
||||
(defsubst org-clock-waybar-get-task-category ()
|
||||
"Get the category of TASK."
|
||||
@ -99,10 +101,7 @@ value of `org-clock-waybar-not-clocked-in-text'."
|
||||
(tooltip (org-clock-waybar-get-tooltip))
|
||||
(class (org-clock-waybar-get-tags))
|
||||
(output (json-new-object)))
|
||||
(setq output (json-add-to-object
|
||||
output
|
||||
"text"
|
||||
(or title org-clock-waybar-not-clocked-in-text)))
|
||||
(setq output (json-add-to-object output "text" (or title "")))
|
||||
(setq output (json-add-to-object output "alt" (or category "")))
|
||||
(setq output (json-add-to-object output "tooltip" (or tooltip "")))
|
||||
(setq output (json-add-to-object output "class" (or class "")))
|
||||
|
Loading…
Reference in New Issue
Block a user