// Snippet to add to ~/.config/waybar/config.jsonc // // 1. Add "custom/ocd" to the "modules-right" (or modules-left/center) array: // // "modules-right": [ // "custom/lang", // "custom/ocd", // <- add this // "group/tray-expander", // "network", // "pulseaudio", // "cpu", // "memory", // "clock", // ], // // 2. Add the module block below anywhere in the top-level object: "custom/ocd": { "exec": "cat $HOME/.local/state/ocd-waybar/state.json", "exec-if": "test -f $HOME/.local/state/ocd-waybar/state.json", "return-type": "json", "interval": 1, "format": "{}", // No "tooltip-format": waybar uses the JSON "tooltip" field written by // the daemon. Setting tooltip-format here overrides it and falls back to // the label text (Waybar issue #3022). "on-click": "~/.config/waybar/scripts/ocd-waybar-ctl advance", "on-click-right": "~/.config/waybar/scripts/ocd-waybar-ctl lock" },