Update org-clock-waybar-output-task and the relevant README parts
This commit is contained in:
parent
cf030fa8d5
commit
907998b3ff
@ -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)`),
|
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
|
you can change the `exec` command to invoke `emacsclient` directly. Note that, since Emacsclient
|
||||||
will be written.:
|
can’t 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
|
```json
|
||||||
"custom/org": {
|
"custom/org": {
|
||||||
"format": " {}",
|
"format": " {}",
|
||||||
"return-type": "json",
|
"return-type": "json",
|
||||||
"restart-interval": 5,
|
"restart-interval": 5,
|
||||||
"exec": "emacsclient --eval '(org-clock-waybar-ouptut-task)'"
|
"exec": "emacsclient --eval '(org-clock-waybar-ouptut-task)' | jq fromjson"
|
||||||
}
|
}
|
||||||
|
|
||||||
```
|
```
|
||||||
|
@ -101,7 +101,7 @@ value of `org-clock-waybar-not-clocked-in-text'."
|
|||||||
This function is ought to be used via Emacsclient:
|
This function is ought to be used via Emacsclient:
|
||||||
|
|
||||||
emacsclient --eval '(org-clock-waybar-output-task)'"
|
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 ()
|
(defun org-clock-waybar-setup ()
|
||||||
"Setup org-clock-waybar.
|
"Setup org-clock-waybar.
|
||||||
|
Loading…
Reference in New Issue
Block a user