7.1 KiB
7.1 KiB
title, type, permalink, tags
| title | type | permalink | tags | ||||
|---|---|---|---|---|---|---|---|
| waybar-pomodoro-not-showing | note | dotfiles/research/waybar-pomodoro-not-showing |
|
Waybar Pomodoro Not Showing — Research Findings
Scope
Investigation of why custom/pomodoro does not appear on the Waybar status bar.
Files inspected: .config/waybar/config, .config/waybar/style.css, .config/waybar/scripts/pomodoro-preset.sh.
Module Wiring (as configured)
modules-left (config line 5–9)
"modules-left": [
"backlight",
"wireplumber",
"custom/pomodoro",
],
custom/pomodoro IS present in modules-left.
custom/pomodoro definition (config lines 133–140)
"custom/pomodoro": {
"format": "{}",
"return-type": "json",
"exec": "waybar-module-pomodoro --no-work-icons",
"on-click": "waybar-module-pomodoro toggle",
"on-click-right": "$HOME/.config/waybar/scripts/pomodoro-preset.sh",
"on-click-middle": "waybar-module-pomodoro reset",
},
CSS selector (style.css lines 106–109)
#custom-pomodoro {
padding: 0 4px;
color: @red;
}
Selector is correct and present.
Script (scripts/pomodoro-preset.sh)
- Guarded by
command -v waybar-module-pomodorocheck (exits 1 if not installed). - Sets work/short/long durations via
waybar-module-pomodoro set-*subcommands. - Toggle cycles between preset A (50/10/20) and preset B (25/5/15).
- Script itself is logically correct.
Root Cause Analysis (ranked by confidence)
🔴 #1 — waybar-module-pomodoro binary not installed / not on PATH (confidence: ~90%)
- The
execcommand iswaybar-module-pomodoro --no-work-icons— a bare binary name, resolved from PATH at Waybar launch time. - Waybar inherits the environment of its launcher (Hyprland
exec-once), which may NOT include the user's shell PATH (~/.local/bin,/usr/local/bin, etc.). fish/config.fishadds/home/alex/dotfiles/.local/binto PATH, but that is only set in interactive Fish sessions — Hyprland's exec-once does not source Fish config.- No package manager manifest, AUR package list, or install script mentions
waybar-module-pomodoro. - When
execfails to start, Waybar hides the module entirely (no fallback text) — the module disappears silently. - This is the most likely cause. Verify with:
which waybar-module-pomodoroin a non-Fish shell, or checkjournalctl --user -u waybarfor "Failed to execute".
🟠 #2 — interval key absent on custom/pomodoro (confidence: ~65%)
custom/pomodorohas NOintervalkey. For a persistent daemon (waybar-module-pomodororuns and writes JSON to stdout continuously), this is correct — Waybar treats it as a long-lived subprocess.- BUT if the binary is supposed to be polled (not a persistent daemon), missing
intervalmeans Waybar will only run it once and never refresh. - The
return-type: jsoncombined with nointervalmeans Waybar expects the binary to continuously emit newline-delimited JSON to stdout. If the binary only emits once and exits, the module will show blank after the first read. - This is a secondary cause contingent on what
waybar-module-pomodoroactually does. If it is a daemon that stays alive, #1 is the only blocker; if it exits after one line,intervalis needed.
🟡 #3 — Binary exists but crashes on --no-work-icons flag (confidence: ~25%)
- The
--no-work-iconsflag may not be a valid flag for the installed version ofwaybar-module-pomodoro. - An unrecognized flag causing the binary to exit with a non-zero code would suppress the module.
- Check:
waybar-module-pomodoro --helporwaybar-module-pomodoro --no-work-iconsmanually.
🟡 #4 — Config JSON parse failure (confidence: ~15%)
- The config uses tab-indented lines (lines 134–139 use
\t) while the rest uses spaces — mixed indentation is cosmetically inconsistent but does NOT cause JSON parse errors. - Waybar's parser accepts JSON5/hjson (trailing commas,
//comments) — both are used in this config and are fine. - No structural JSON error was found in the config.
⚪ #5 — Hyprland not auto-starting Waybar at all (confidence: ~10%)
- If
exec-once=waybarinhyprland.confis missing or commented out, the bar won't show at all (not just the pomodoro module). Not specific to this module.
Concrete Edit Points
Fix #1 (most likely): Ensure binary is installed and PATH is set in Waybar launch environment
Option A — Install the binary system-wide:
Install waybar-module-pomodoro via your package manager (e.g. paru -S waybar-module-pomodoro on Arch) so it is in /usr/bin or /usr/local/bin, which is always in Waybar's inherited PATH.
Option B — Use absolute path in config:
- "exec": "waybar-module-pomodoro --no-work-icons",
- "on-click": "waybar-module-pomodoro toggle",
- "on-click-middle": "waybar-module-pomodoro reset",
+ "exec": "$HOME/.local/bin/waybar-module-pomodoro --no-work-icons",
+ "on-click": "$HOME/.local/bin/waybar-module-pomodoro toggle",
+ "on-click-middle": "$HOME/.local/bin/waybar-module-pomodoro reset",
File: .config/waybar/config, lines 136–139.
Option C — Set PATH in Hyprland env (preferred for Wayland):
Add to .config/hypr/hyprland.conf:
env = PATH,$HOME/.local/bin:/usr/local/bin:/usr/bin:/bin
Fix #2 (if binary is a one-shot, not a daemon): Add interval key
"custom/pomodoro": {
"format": "{}",
"return-type": "json",
+ "interval": 1,
"exec": "waybar-module-pomodoro --no-work-icons",
File: .config/waybar/config, line 134 (insert after "return-type": "json",).
Files Involved
| File | Role |
|---|---|
.config/waybar/config |
Module registration in modules-left, custom/pomodoro definition |
.config/waybar/style.css |
#custom-pomodoro CSS selector (present, correct) |
.config/waybar/scripts/pomodoro-preset.sh |
Right-click preset toggler (calls binary) |
.config/hypr/hyprland.conf |
Waybar autostart + env block (outside Waybar dir) |
waybar-module-pomodoro binary |
External binary — must be installed and on PATH |
Likely Bug Surfaces (Adjacent Risk Areas)
custom/uptime(config line 89–95): Also uses a bare script path$HOME/.config/waybar/scripts/uptime.sh. Same PATH-at-launch issue could affect it if shell env is not inherited. The script exists in the repo (scripts/dir shows onlypomodoro-preset.sh) —uptime.shis missing from the repo, meaning this module may also be broken.custom/music(config line 44–52): Usesplayerctl— same PATH issue; noplayerctlinstall evidence in the repo.hyprland/workspaces(config line 22–28): Defined in config but NOT in any ofmodules-left,modules-center, ormodules-right— it is a dead definition that never renders.custom/lock(config line 127–131): Defined but also absent from all three module lists — another dead definition.network(config line 60–68): Defined but not in any module list — dead definition.- Trailing comma on line 8 of
modules-left: Benign in Waybar's parser but would break standard JSON parsers if config is ever processed by tools expecting strict JSON.
Relations
- related_to dotfiles/knowledge