forked from gergely/org-clock-waybar
Add the org-clock-waybar-output-task function
It outputs the generated JSON string to the standard output so it can be used directly from the command line, e.g. using `emacsclient`.
This commit is contained in:
@@ -95,6 +95,14 @@ value of `org-clock-waybar-not-clocked-in-text'."
|
||||
(insert (org-clock-waybar--get-clocked-task-json))
|
||||
(write-file org-clock-waybar-filename)))
|
||||
|
||||
(defun org-clock-waybar-ouptut-task ()
|
||||
"Output the current task in JSON format Waybar can understand.
|
||||
|
||||
This function is ought to be used via Emacsclient:
|
||||
|
||||
emacsclient --eval '(org-clock-waybar-output-task)'"
|
||||
(print (org-clock-waybar--get-clocked-task-json)))
|
||||
|
||||
(defun org-clock-waybar-setup ()
|
||||
"Setup org-clock-waybar.
|
||||
|
||||
|
Reference in New Issue
Block a user