Add more config options and a tooltip #1

Merged
gergely merged 2 commits from Cadair/org-clock-waybar:main into main 2021-03-11 16:43:28 +00:00
Showing only changes of commit bc61218f92 - Show all commits

View File

@ -23,6 +23,12 @@ To add the current task to Waybar, add this snippet to your config:
} }
``` ```
Then, add `custom/org` to `modules-left`/`modules-center`/`module-right` if your bars
configuration. You can find a minimal working configuration in the [`examples`](./examples)
directory.
### Additional Configuration
You can also display an icon specific to the clocked tasks category with the `format-icons` key: You can also display an icon specific to the clocked tasks category with the `format-icons` key:
```json ```json
@ -62,9 +68,15 @@ If you run emacs in this mode you can also eval commands on click, middle click
``` ```
Then, add `custom/org` to `modules-left`/`modules-center`/`module-right` if your bars If you want the taskbar to show nothing or some other content if the emacs server is not running then you need to write a short bash script to catch when the emacsclient command returns a non-zero exit code. An example of this is:
configuration. You can find a minimal working configuration in the [`examples`](./examples)
directory. ```bash
#!/bin/bash
json=$(emacsclient --eval '(org-clock-waybar-ouptut-task)' 2> /dev/null)
status=$?
[ $status -eq 0 ] && echo $(echo $json | jq fromjson --unbuffered --compact-output) || echo ""
```
## Customization ## Customization