feat(tools): 1080p themed-desktop capture harness + first polish findings (item 28c)
All checks were successful
Check / eval (push) Successful in 3m2s

tools/theme-shot.nix: boots the full themed desktop headlessly
(software-GL Hyprland, THEME env picks the slug) at 1920x1080 and
QMP-dumps desktop.png + menu.png (rofi root open) — the review
artifact for slice (c). Two fixes over the 2026-06-19 spike:
home-manager.useGlobalPkgs (the HM submodule otherwise misses the
overlay) and the menu shot via hyprctl dispatch exec. Maintainer tool,
deliberately not a checks.* gate. Known gap in the header: the
wallpaper needs ~/.nomarchy seeded in the guest.

First full-res review (tokyo-night) added to the item-28 punch list:
rofi root menu is ~760px of mostly empty row space (candidate:
right-aligned SUPER+CTRL hints from keybinds.nix), full-color Papirus
menu icons vs the all-monochrome bar glyphs is a [human] identity
call, bar right-cluster group margins confirmed at full res, and the
bar's alpha(text,.5) dim states should become the @muted role now
that 28b floors guarantee its legibility. Whole-swap bar module
parity verified textually — no drift.

Verified: harness end-to-end green (screenshots read back); evals
from tools/ via the relative flake path.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Bernardo Magri
2026-07-05 20:00:28 +01:00
parent 44d5516191
commit fb75c3dedf
3 changed files with 112 additions and 2 deletions

View File

@@ -64,8 +64,30 @@ warn ≥ 2.5 (21×7 pairings green; audit contrast findings 20 → 1 —
miasma's earthy `bad` stays as identity, good/bad floors stay
audit-only so no exemption list was needed). Remaining (b): nothing —
further palette work graduates from slices (c)/(d) findings;
(c) per-surface polish slices;
(d) the whole-swap themes brought to the same bar. Visual work is
(c) per-surface polish slices — capture harness ✓ shipped 2026-07-05
(iteration #34): `tools/theme-shot.nix` boots the themed desktop
headlessly at 1080p and screenshots desktop + open root menu (proven
on tokyo-night); per-surface punch items from the first full-res
review:
- **rofi root menu width:** ~760px for six short left-hugging rows —
either tighten, or use the space: right-aligned `SUPER+CTRL+<key>`
hint per row (keybinds.nix already knows them; discoverability
win).
- **Icon weight mix `[human]`:** full-color Papirus icons in the
menus vs all-monochrome bar glyphs — pick: symbolic/monochrome
menu icons for one system, or color as the menu's identity.
- **Bar right-cluster rhythm:** confirmed at 1080p — add group
margins (tray/net · stats · toggles · battery/notify) on the
gaps grid.
- **Semantic dim:** bar dim states are `alpha(@text, 0.5)` tints;
the palette's `muted` role is now floor-guaranteed (28b) — one
semantic source, use `@muted`.
- Harness gap: wallpaper needs `~/.nomarchy` seeded in the guest
(theme-sync reads runtime state there) — add before vibe-review
captures; whole-swap captures (summer-day/night) 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
V3-bound by nature — screenshots are the review artifact, hardware
confirms.

View File

@@ -17,6 +17,28 @@ Template:
---
## 2026-07-05 — 1080p capture harness + first slice-c review (iteration #34, item 28c)
- **Task:** item 28 slice (c) prep — full-res captures for the
per-surface polish pass.
- **Did:** tools/theme-shot.nix (maintainer tool, THEME env-driven):
full themed desktop headless at 1920x1080 via the memory recipe +
two fixes over the spike — home-manager.useGlobalPkgs (HM submodule
otherwise misses the overlay → 'nomarchy-theme-sync missing') and a
menu.png shot (hyprctl dispatch exec nomarchy-menu). Proven on
tokyo-night; both shots read. Findings → item 28 punch list: rofi
root width vs empty space (→ keybind-hint column idea), icon-weight
mix (color Papirus vs mono bar) `[human]`, bar group margins
confirmed, alpha-tint dim vs @muted role. Whole-swap module parity
verified textually (no drift; cpu/memory omission is identity).
- **Verified:** harness runs end-to-end (exit 0, screenshots read);
eval from tools/ with relative flake path OK. Wallpaper still
doesn't paint (theme-sync needs ~/.nomarchy in the guest — fix
noted in the header for the next run).
- **Pending:** capture summer-day/night (whole-swaps) + latte;
then the polish slices; icon-weight call is Bernardo's.
- **Next suggestion:** run the retuned-theme captures + start the
cheap polish items (group margins, @muted adoption).
## 2026-07-05 — P2 floors retuned + gated (iteration #33, item 28b done)
- **Task:** item 28 slice (b) remainder — the P2 contrast floors.
- **Did:** 18 hex retunes across 9 themes: muted raised on lumon/

66
tools/theme-shot.nix Normal file
View File

@@ -0,0 +1,66 @@
# Themed-desktop capture harness (item 28 slice c) — boots the full
# desktop headlessly (software-GL Hyprland) at 1920x1080 and QMP-dumps
# two screenshots into $out: desktop.png and menu.png (rofi root open).
# 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.
let
flake = builtins.getFlake ("git+file://" + toString ../.);
inherit (flake.inputs) nixpkgs home-manager;
pkgs = import nixpkgs {
system = "x86_64-linux";
overlays = [ flake.overlays.default ];
config.allowUnfree = true;
};
slug = let s = builtins.getEnv "THEME"; in if s == "" then "tokyo-night" else s;
in
pkgs.testers.runNixOSTest {
name = "theme-shot-${slug}";
node.pkgsReadOnly = false; # nomarchy sets nixpkgs.config
node.specialArgs = { username = "nomarchy"; };
nodes.machine = { pkgs, lib, ... }: {
imports = [ flake.nixosModules.nomarchy home-manager.nixosModules.home-manager ];
virtualisation.memorySize = 4096;
virtualisation.cores = 4;
# Software GL for Hyprland (GLES/aquamarine) without a host GPU.
hardware.graphics.enable = true;
environment.variables.LIBGL_ALWAYS_SOFTWARE = "1";
boot.initrd.availableKernelModules = [ "virtio_gpu" ];
virtualisation.qemu.options = [ "-vga none" "-device virtio-gpu-pci,xres=1920,yres=1080" ];
users.users.nomarchy = {
isNormalUser = true;
password = "test";
extraGroups = [ "wheel" "video" ];
};
nomarchy.system.stateFile = flake + "/themes/${slug}.json";
services.greetd.settings.initial_session = {
command = "start-hyprland";
user = "nomarchy";
};
home-manager.useGlobalPkgs = true; # HM must see the overlay'd node pkgs
home-manager.users.nomarchy = {
imports = [ flake.homeModules.nomarchy ];
nomarchy.stateFile = flake + "/themes/${slug}.json";
nomarchy.idle.enable = false; # no lock/dpms during the shot
};
};
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)
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"
machine.execute(hy + " nomarchy-menu' >/dev/null 2>&1")
machine.sleep(8)
machine.screenshot("menu")
'';
}