diff --git a/org-clock-waybar.el b/org-clock-waybar.el index 239a45f..ef028de 100644 --- a/org-clock-waybar.el +++ b/org-clock-waybar.el @@ -69,7 +69,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." @@ -102,10 +104,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 "")))