feat(tools): seed guest state at boot so captures render wallpapers (item 28c)
All checks were successful
Check / eval (push) Successful in 3m8s

theme-shot guests had no ~/.nomarchy, so the session's exec-once
`nomarchy-theme-sync wallpaper` died on missing state and captures
showed a bare base-color backdrop. Seed theme-state.json via tmpfiles
before greetd starts the session — the real exec-once path now paints.
(A post-boot testScript seed is too late for exec-once, and a manual
re-run fails without WAYLAND_DISPLAY: awww's client socket is
display-named.)

V2: summer-night capture renders wallpaper + inverted cream bar +
menu + placeholder dim, all coherent.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Bernardo Magri
2026-07-05 22:09:52 +01:00
parent 01ee847490
commit 39cfe0fb12
3 changed files with 44 additions and 12 deletions

View File

@@ -99,10 +99,17 @@ review:
0xFFEFF1F5); captures show dark because awww's empty-state layer
paints over it in the wallpaper-less VM — on hardware the fix
covers its intended window (the pre-awww startup gap).
- Harness gap: wallpaper needs `~/.nomarchy` seeded in the guest
(theme-sync reads runtime state there) — add before vibe-review
captures; latte + an identity theme (lumon/retro-82) captures
still pending;
- Harness gap fixed (iteration #44): guest `~/.nomarchy` seeded
via tmpfiles BEFORE greetd starts the session, so the session's
own exec-once wallpaper paint runs (a post-boot testScript seed
was too late for exec-once, and a manual re-run fails without
WAYLAND_DISPLAY — awww's client socket is display-named).
Wallpaper-complete summer-night capture reviewed: lakeside night
scene + cream inverted bar + menu-over-scene all cohere; the
placeholder dim (#2d353b99) renders. Note: summer-night's cream
bar/menu on dark backdrop is the authored inverted design (fg as
surface), not a rendering bug.
- An identity theme (lumon/retro-82) vibe capture still pending;
(d) the whole-swap themes brought to the same bar (module parity
verified textually 2026-07-05: whole-swaps carry every functional
module; omitting cpu/memory is identity). Visual work is

View File

@@ -17,6 +17,23 @@ Template:
---
## 2026-07-05 — capture harness paints wallpapers (iteration #44, item 28c)
- **Task:** item 28c harness gap — captures rendered a bare base-color
backdrop because the guest had no `~/.nomarchy` runtime state.
- **Did:** tools/theme-shot.nix now seeds theme-state.json via tmpfiles
at boot (before greetd), so the session's exec-once
`nomarchy-theme-sync wallpaper` paints naturally; dropped the
testScript seed+manual-repaint (too late for exec-once; manual runs
also lack WAYLAND_DISPLAY, which awww's client needs to find its
socket).
- **Verified:** V2 — summer-night capture shows wallpaper + cream
inverted bar + menu + placeholder dim, all coherent. V1 flake check
green.
- **Pending:** identity-theme vibe capture (lumon/retro-82); the
`[human]` icon-weight call; HARDWARE-QUEUE eyeballs.
- **Next suggestion:** item 28c identity capture, or park 28 for
Bernardo's taste calls.
## 2026-07-05 — clock zone tooltip (iteration #43, LATER item)
- **Task:** LATER auto-timezone Waybar tooltip. Bullet deleted.
- **Did:** the clock tooltip's first line is now the zone —

View File

@@ -4,10 +4,11 @@
# Maintainer tool, NOT a checks.* gate (a full-desktop VM is far too
# heavy for CI). Impure: THEME env picks the theme slug.
# THEME=<slug> nix build --impure -f tools/theme-shot.nix --no-link --print-out-paths
# Known gap: the wallpaper does not paint — nomarchy-theme-sync resolves
# state from ~/.nomarchy at runtime, absent in the guest; seed it
# (cp the flake to ~nomarchy/.nomarchy in testScript) if the wallpaper
# matters to the shot. Bar + menus render fully.
# The guest gets a minimal ~/.nomarchy (just the theme JSON as
# theme-state.json), seeded via tmpfiles BEFORE greetd starts the
# session, so the session's own exec-once wallpaper paint works —
# assets come from the themesDir baked into the tool. Bar, menus AND
# wallpaper render.
let
flake = builtins.getFlake ("git+file://" + toString ../.);
inherit (flake.inputs) nixpkgs home-manager;
@@ -38,6 +39,14 @@ pkgs.testers.runNixOSTest {
extraGroups = [ "wheel" "video" ];
};
nomarchy.system.stateFile = flake + "/themes/${slug}.json";
# Seed the runtime state (theme-sync reads $NOMARCHY_PATH, default
# ~/.nomarchy) before greetd auto-starts the session, so the
# exec-once `nomarchy-theme-sync wallpaper` finds it and paints.
# NixOS activation creates /home/nomarchy before systemd runs.
systemd.tmpfiles.rules = [
"d /home/nomarchy/.nomarchy 0755 nomarchy users -"
"C /home/nomarchy/.nomarchy/theme-state.json 0644 nomarchy users - ${flake + "/themes/${slug}.json"}"
];
services.greetd.settings.initial_session = {
command = "start-hyprland";
user = "nomarchy";
@@ -52,10 +61,9 @@ pkgs.testers.runNixOSTest {
testScript = ''
machine.wait_for_unit("multi-user.target")
machine.wait_for_file("/run/user/1000/hypr", 180)
machine.sleep(12)
# Paint the wallpaper explicitly (awww timing was flaky in the spike).
machine.execute("su - nomarchy -c 'XDG_RUNTIME_DIR=/run/user/1000 nomarchy-theme-sync wallpaper' >/dev/null 2>&1")
machine.sleep(18)
# The session exec-once paints the wallpaper (softGL first paint at
# 1920x1080 is slow) give it a generous settle.
machine.sleep(30)
machine.screenshot("desktop")
# Open the root menu for the polish review.
hy = "su - nomarchy -c 'XDG_RUNTIME_DIR=/run/user/1000 HYPRLAND_INSTANCE_SIGNATURE=$(ls /run/user/1000/hypr | head -1) hyprctl dispatch exec"