forked from gergely/org-clock-waybar
Compare commits
11 Commits
41181a9392
...
org-mode-9
| Author | SHA1 | Date | |
|---|---|---|---|
| 300574fff4 | |||
| 514e3a813c | |||
| dda3fc6eb0 | |||
| 629a9e335e | |||
| f281941cca | |||
| 8a20f8e8db | |||
| 96772487c4 | |||
|
|
a23ccff851 | ||
| 700027bdd5 | |||
| 1dafd1306e | |||
| 2d820dbf87 |
@@ -148,24 +148,24 @@ When nil, the percentage text will be an empty string."
|
||||
The output is in JSON format constructed in a way so Waybar can process it.
|
||||
If there is no clocked in task, alt becomes empty and text will be set to the
|
||||
value of `org-clock-waybar-not-clocked-in-text'."
|
||||
(let* ((text-func (or (and (fboundp ('org-clock-waybar-text-function)))
|
||||
#'org-clock-waybar-get-task-title))
|
||||
(let* ((text-func (or 'org-clock-waybar-text-function
|
||||
'org-clock-waybar-get-task-title))
|
||||
(text (funcall text-func))
|
||||
(alt-func (or (and (fboundp ('org-clock-waybar-alt-function)))
|
||||
#'org-clock-waybar-get-task-category))
|
||||
(alt-func (or 'org-clock-waybar-alt-function
|
||||
'org-clock-waybar-get-task-category))
|
||||
(alt (funcall alt-func))
|
||||
(tooltip-func (or (and (fboundp ('org-clock-waybar-tooltip-function)))
|
||||
#'org-clock-waybar-get-tooltip))
|
||||
(tooltip-func (or 'org-clock-waybar-tooltip-function
|
||||
'org-clock-waybar-get-tooltip))
|
||||
(tooltip (funcall tooltip-func))
|
||||
(class-func (or (and (fboundp ('org-clock-waybar-class-function)))
|
||||
#'org-clock-waybar-get-tags))
|
||||
(class-func (or 'org-clock-waybar-class-function
|
||||
'org-clock-waybar-get-tags))
|
||||
(class (funcall class-func))
|
||||
(percentage (when (fboundp 'org-clock-waybar-percentage-function)
|
||||
(funcall #'org-clock-waybar-percentage-function)))
|
||||
(funcall 'org-clock-waybar-percentage-function)))
|
||||
(output (json-new-object)))
|
||||
(or (null text)
|
||||
(stringp text)
|
||||
(error "Text must be a string (org-clock-waybar)!"))
|
||||
(or (null title)
|
||||
(stringp title)
|
||||
(error "Title must be a string (org-clock-waybar)!"))
|
||||
(or (null alt)
|
||||
(stringp alt)
|
||||
(error "Alt text must be a string (org-clock-waybar)!"))
|
||||
|
||||
Reference in New Issue
Block a user