Add JSONC example config and troubleshooting note to README
This commit is contained in:
@@ -15,6 +15,7 @@ A small, dependency-free Python time tracker for Waybar with a start/stop button
|
||||
|------|---------|
|
||||
| `time_track.py` | Main CLI and Waybar interface |
|
||||
| `waybar-config.json` | Example Waybar custom module configuration |
|
||||
| `waybar-config.jsonc` | Same example, with comments (for Waybar JSONC configs) |
|
||||
| `style.css` | Example CSS for the running/idle states |
|
||||
|
||||
## Installation
|
||||
@@ -25,9 +26,13 @@ A small, dependency-free Python time tracker for Waybar with a start/stop button
|
||||
chmod +x /path/to/time_track/time_track.py
|
||||
```
|
||||
|
||||
2. Add the custom module from `waybar-config.json` to your Waybar config (`~/.config/waybar/config`).
|
||||
2. Add the custom module from `waybar-config.json` (or `waybar-config.jsonc`) to your Waybar config (`~/.config/waybar/config` or `~/.config/waybar/config.jsonc`).
|
||||
3. Add the CSS from `style.css` to your Waybar stylesheet (`~/.config/waybar/style.css`).
|
||||
4. Update the paths in `waybar-config.json` to point to wherever you place `time_track.py`.
|
||||
4. Update the paths in the config to point to wherever you placed `time_track.py`.
|
||||
|
||||
### Why the module might not show
|
||||
|
||||
If the Waybar module appears but has no text, check that `"format"` is **not empty**. When `return-type` is `"json"`, Waybar replaces `"{}"` with the `text` field emitted by the script. An empty `format` (`""`) makes the module invisible. Use `"format": "{}"` or omit the field entirely.
|
||||
|
||||
## CLI usage
|
||||
|
||||
|
||||
Reference in New Issue
Block a user