From ef4eca198e9719f02f69cf61f85ec73a0fc4c5e6 Mon Sep 17 00:00:00 2001 From: Florian Egger Date: Wed, 2 Sep 2026 13:09:15 +0200 Subject: [PATCH] Add JSONC example config and troubleshooting note to README --- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3468ccf..fb51a8b 100644 --- a/README.md +++ b/README.md @@ -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