aboutsummaryrefslogtreecommitdiffstats
path: root/CLAUDE.md
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-09-16 09:44:26 +0200
committerDanilo M. <danix@danix.xyz>2026-09-16 09:44:26 +0200
commit845e6d3f393811bdc78833c9457d9768e685e572 (patch)
treed8adbb5631936c55e95da08405a130b4525cf698 /CLAUDE.md
parentda1f0761e8a902b68134cdd9ec5eac3c549a9fcb (diff)
downloadwallp-845e6d3f393811bdc78833c9457d9768e685e572.tar.gz
wallp-845e6d3f393811bdc78833c9457d9768e685e572.zip
feat: drop pywal theming for the unified desktop themeHEADmaster
wallp no longer owns a colour theme. The --theme flag, the THEME config key, the persisted ~/.config/wallp/theme file and the wal invocation are gone; finalize now writes ~/.cache/udt/wpaper and hands it to udt-accent, which owns the whole palette (rofi, Hyprland, Firefox, quickshell, Sublime). That call is best-effort: a missing or failing udt-accent must never stop a wallpaper from being set, so wal is also dropped from the required-binary check. Tests follow the same shape: the theme-resolution and apply_theme cases are removed, the wal stub is replaced by udt-accent, and two new cases cover finalize calling udt-accent on the symlink and surviving its failure. Docs updated to match, including the install method: ~/bin/wallp is now a symlink to the checkout rather than a copy, so repo edits no longer need a manual re-copy to reach the live desktop. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Diffstat (limited to 'CLAUDE.md')
-rw-r--r--CLAUDE.md33
1 files changed, 19 insertions, 14 deletions
diff --git a/CLAUDE.md b/CLAUDE.md
index 3387dee..c30a2c8 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -7,14 +7,16 @@ Guidance for AI agents working in this repo.
`wallp` — a single bash script that sets and restores wallpapers on a fixed
two-screen wayland (sway/hyprland) setup. It merges two older scripts
(`multiwal.sh` interactive setter, `qar-lastwall.sh` restorer). Uses `swaybg` to
-paint wallpapers, `qarma` for GUI selection, `wal` (pywal) for the color theme.
+paint wallpapers, `qarma` for GUI selection, and `udt-accent` (the unified
+desktop theme tool, outside this repo) to refresh the accent colour from the
+wallpaper. `wallp` no longer runs pywal and has no theme of its own.
Logical screens are `H` (horizontal) and `V` (vertical), mapped to physical
outputs via config (`OUTPUT_H`/`OUTPUT_V`).
## Layout
-- `wallp` — the whole program (one bash file, ~320 lines).
+- `wallp` — the whole program (one bash file, ~310 lines).
- `tests/wallp.bats` — bats test suite (the only tests).
- `wallp.conf.example` — sample config.
- `docs/superpowers/specs/` — design spec.
@@ -29,7 +31,7 @@ bats tests/wallp.bats
```
Requires `bats` (1.5.0 known good). Tests run hermetically: `setup()` creates a
-temp `$HOME`, stubs `swaybg`/`wal`/`qarma`/`notify-send`/`pkill`/`kill` on `PATH`
+temp `$HOME`, stubs `swaybg`/`udt-accent`/`qarma`/`notify-send`/`pkill`/`kill` on `PATH`
(each logs its call to `$HOME/calls.log` and exits 0), then `source`s `wallp`.
The sourcing guard at EOF (`[ "${BASH_SOURCE[0]}" = "$0" ]`) keeps `main` from
running on source — **do not remove it.**
@@ -44,18 +46,18 @@ Syntax check: `bash -n wallp`.
the function directly when asserting on globals (`CONF_*`, `SET_*`) or
filesystem side effects, since `run` executes in a subshell.
- **Pure logic is unit-testable** (conf parse, arg parse, tilde expansion, output
- mapping, theme resolution). Side-effecting bits (`swaybg`, `wal`, `qarma`) are
- isolated in thin functions and exercised via the PATH stubs.
+ mapping). Side-effecting bits (`swaybg`, `udt-accent`, `qarma`) are isolated in
+ thin functions and exercised via the PATH stubs.
- `set -u` is on. Empty-array expansion `"${set_args[@]}"` is safe on bash ≥ 4.4
(this host is fine). Guard env vars with `${VAR:-}`.
- Quote all paths (wallpaper filenames may contain spaces).
## Critical gotchas
-- **Install is a COPY, not a symlink.** The live binary is `~/bin/wallp`, copied
- from this repo. After editing repo `wallp`, re-copy:
- `cp /home/danix/Programming/GIT/wallp/wallp ~/bin/wallp`
- Otherwise hypr autostart/keybind run the stale version.
+- **Install is a symlink.** `~/bin/wallp` points at this checkout's `wallp`, so
+ repo edits are live immediately for the hypr autostart/keybind. No re-copy
+ step. (It used to be a plain copy, which shipped stale versions.)
+ Recreate with: `ln -sf "$PWD/wallp" ~/bin/wallp`
- **qarma `--list` needs `--radiolist --print-column=2`.** A plain `--list`
prints nothing on selection (bug that shipped once). `qarma_select` depends on
these flags; a regression test guards it.
@@ -71,14 +73,17 @@ Syntax check: `bash -n wallp`.
the other — there's a test for this; keep it green.
- **`load_conf` return codes:** 0 ok, 1 invalid (missing required key), 10
bootstrapped (template just written → caller exits 0, no wallpaper change).
-- **Persistence is wallp-owned**, under `~/.config/wallp/` (`wall_h`, `wall_v`,
- `theme`). `~/.cache/wal/wpaper` symlink is still maintained (rofi reads it).
- `~/bin/wal.sh` was trimmed to dunst+kitty glue only; it no longer touches
- wallpaper pointers.
+- **Persistence is wallp-owned**, under `~/.config/wallp/` (`wall_h`, `wall_v`).
+ `finalize` writes the `~/.cache/udt/wpaper` symlink, then calls
+ `udt-accent "$HOME/.cache/udt/wpaper"`. That call is never fatal: if the binary
+ is missing or exits non-zero, the wallpaper still stands. `udt-accent` owns the
+ whole palette (rofi, Hyprland, Firefox, quickshell, Sublime), so nothing here
+ renders colours first.
## External integration (outside this repo)
-- `~/bin/wal.sh` — wal's `-o` hook; dunst + kitty theming only now.
+- `~/bin/udt-accent` — unified desktop theme accent picker; reads
+ `~/.cache/udt/wpaper`, writes the rest of the palette.
- `~/.config/hypr/sections/autostart.lua` → `wallp --restore`.
- `~/.config/hypr/sections/keybindings.lua` → `wallp --set` (mainMod+Return).
- Old `~/bin/multiwal.sh` + `qar-lastwall.sh` kept as fallback, unreferenced.