Update org-clock-waybar-output-task and the relevant README parts

This commit is contained in:
Gergely Polonkai 2021-03-11 07:21:13 +01:00
parent cf030fa8d5
commit 907998b3ff
No known key found for this signature in database
GPG Key ID: 2D2885533B869ED4
2 changed files with 6 additions and 4 deletions

View File

@ -24,15 +24,17 @@ To add the current task to Waybar, add this snippet to your config:
```
If you use Emacs as a daemon (e.g. starting it as `emacs --daemon` or calling `(server-start)`),
you can change the `exec` command to invoke `emacsclient` directly. In this case, no output file
will be written.:
you can change the `exec` command to invoke `emacsclient` directly. Note that, since Emacsclient
cant actually write stuff to the terminal, it will output an Emacs string full of backslashes
(see [this Emacs SE answer for details](https://emacs.stackexchange.com/a/28668/507)); thus, you
have to pipe the output through `jq fromjson`. In this case, no output file will be written.:
```json
"custom/org": {
"format": " {}",
"return-type": "json",
"restart-interval": 5,
"exec": "emacsclient --eval '(org-clock-waybar-ouptut-task)'"
"exec": "emacsclient --eval '(org-clock-waybar-ouptut-task)' | jq fromjson"
}
```

View File

@ -101,7 +101,7 @@ value of `org-clock-waybar-not-clocked-in-text'."
This function is ought to be used via Emacsclient:
emacsclient --eval '(org-clock-waybar-output-task)'"
(print (org-clock-waybar--get-clocked-task-json)))
(org-clock-waybar--get-clocked-task-json))
(defun org-clock-waybar-setup ()
"Setup org-clock-waybar.