64 lines
3.3 KiB
Markdown
64 lines
3.3 KiB
Markdown
---
|
|
title: waybar-pomodoro-not-showing
|
|
type: note
|
|
permalink: dotfiles/plans/waybar-pomodoro-not-showing
|
|
tags:
|
|
- waybar
|
|
- pomodoro
|
|
- plan
|
|
---
|
|
|
|
# Waybar Pomodoro Not Showing Implementation Plan
|
|
|
|
> For implementation: use `subagent-driven-development` when subagents are available; otherwise use `executing-plans`.
|
|
|
|
**Goal:** Restore the Waybar pomodoro module so it reliably appears on the bar.
|
|
|
|
**Architecture:** The `custom/pomodoro` Waybar module depends on an external `waybar-module-pomodoro` binary and a preset helper script. The most likely failure mode is launch-time PATH mismatch between Hyprland/Waybar and the interactive shell, so the minimal fix is to make module and helper invocations explicit and independent of shell PATH.
|
|
|
|
**Tech Stack:** JSONC-style Waybar config, shell script, Hyprland/Wayland desktop environment.
|
|
|
|
## File map
|
|
- Modify `.config/waybar/config` — make the pomodoro module invoke the binary explicitly.
|
|
- Modify `.config/waybar/scripts/pomodoro-preset.sh` — make the preset helper use the same explicit binary path.
|
|
|
|
## Task 1: Fix pomodoro command wiring
|
|
|
|
**Files:**
|
|
- Modify: `.config/waybar/config`
|
|
- Modify: `.config/waybar/scripts/pomodoro-preset.sh`
|
|
|
|
**Acceptance criteria:**
|
|
- `custom/pomodoro` no longer depends on login-session PATH to find `waybar-module-pomodoro`.
|
|
- Right-click preset switching still works.
|
|
- The change is minimal and limited to pomodoro-related wiring.
|
|
|
|
**Non-goals:**
|
|
- Do not refactor unrelated Waybar modules.
|
|
- Do not add system-wide installation steps or package management changes.
|
|
|
|
**Verification:**
|
|
- Run `bash -n /home/alex/dotfiles/.config/waybar/scripts/pomodoro-preset.sh` successfully.
|
|
- Run `/home/alex/.local/bin/waybar-module-pomodoro --help` successfully to verify the explicit binary path exists.
|
|
- Inspect resulting config references to confirm they use the explicit path consistently.
|
|
|
|
**Likely regression surfaces:**
|
|
- Right-click preset command path drift.
|
|
- Middle-click reset command still using the old bare binary name.
|
|
|
|
## Pre-mortem
|
|
- Most likely failure: only one of the pomodoro entry points is updated, leaving click actions broken.
|
|
- Fragile assumption: the binary remains at `/home/alex/.local/bin/waybar-module-pomodoro`.
|
|
- Redesign trigger: if the binary path is unstable across sessions or machines, prefer a Hyprland PATH fix instead.
|
|
- Easy-to-miss regression: preset helper still using `command -v` and failing under Waybar's environment.
|
|
|
|
## Execution notes
|
|
- Updated `.config/waybar/config` `custom/pomodoro` wiring to use `$HOME/.local/bin/waybar-module-pomodoro` for `exec`, `on-click`, and `on-click-middle`.
|
|
- Updated `.config/waybar/scripts/pomodoro-preset.sh` to remove PATH reliance by introducing `POMODORO_BIN="$HOME/.local/bin/waybar-module-pomodoro"`, replacing the `command -v` guard with `[[ ! -x "$POMODORO_BIN" ]]`, and routing all `set-work`/`set-short`/`set-long` calls through `"$POMODORO_BIN"`.
|
|
- Scope remained pomodoro-only; no unrelated Waybar modules or scripts were changed.
|
|
|
|
## Outcomes
|
|
- `bash -n /home/alex/dotfiles/.config/waybar/scripts/pomodoro-preset.sh` passed (no syntax errors).
|
|
- `/home/alex/.local/bin/waybar-module-pomodoro --help` succeeded and printed usage, confirming explicit-path binary availability.
|
|
- No practical automated test harness exists here for full Waybar runtime rendering in this task context; verification used the minimal command-level checks above.
|