fix(waybar): #51 doctor glyph renders + #52 V2 bake asserts
All checks were successful
Check / eval (push) Successful in 3m6s
All checks were successful
Check / eval (push) Successful in 3m6s
Doctor tripwire was self-hiding under waybar (PATH miss / weak glyph). Call nomarchy-doctor by store path, strip ANSI tooltips, use + format + signal 10 (generated and whole-swap). theme-shot asserts class:bad, guest btop.theme, and pokes RTMIN+10 before desktop shots. V2: theme-shot green for rose-pine, summer-night, catppuccin, everforest, vantablack; bar crops show the red alert-circle. btop TUI visual is softGL-blocked (Ghostty) → HARDWARE-QUEUE. Closes #51 and #52.
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
# 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).
|
||||
# screenshots into $out: desktop.png, menu.png (rofi root open), and
|
||||
# btop.png (Ghostty running btop, when the terminal starts under softGL).
|
||||
# Also asserts nomarchy-doctor-status JSON (class:bad) — the harness
|
||||
# seeds an untracked theme-state.json, so doctor always reports ✖.
|
||||
# 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
|
||||
@@ -66,6 +69,18 @@ pkgs.testers.runNixOSTest {
|
||||
# The session exec-once paints the wallpaper (softGL first paint at
|
||||
# 1920x1080 is slow) — give it a generous settle.
|
||||
machine.sleep(30)
|
||||
# Doctor indicator contract: untracked theme-state → ✖ → status JSON
|
||||
# with class:bad and the glyph (Waybar self-shows the module).
|
||||
status = machine.succeed("su - nomarchy -c 'nomarchy-doctor-status'")
|
||||
assert '"class":"bad"' in status, f"doctor-status not bad: {status!r}"
|
||||
assert ("" in status or "" in status), f"doctor glyph missing: {status!r}"
|
||||
# Baked btop theme must be present (asset or generated) for the slug.
|
||||
machine.succeed("test -f /home/nomarchy/.config/btop/themes/nomarchy.theme")
|
||||
machine.succeed("grep -q 'theme\\[main_bg\\]' /home/nomarchy/.config/btop/themes/nomarchy.theme")
|
||||
# Poke custom/doctor (signal 10) so a first-poll miss at session start
|
||||
# doesn't leave the tripwire blank for the full 300s interval.
|
||||
machine.execute("su - nomarchy -c 'pkill -RTMIN+10 waybar' >/dev/null 2>&1 || true")
|
||||
machine.sleep(3)
|
||||
# Park the cursor in the bottom-right corner so it doesn't sit in the
|
||||
# middle of the desktop shot (that frame doubles as the theme-picker
|
||||
# preview.png source).
|
||||
@@ -76,5 +91,15 @@ pkgs.testers.runNixOSTest {
|
||||
machine.execute(hy + " exec nomarchy-menu' >/dev/null 2>&1")
|
||||
machine.sleep(8)
|
||||
machine.screenshot("menu")
|
||||
# Close menu, launch btop in Ghostty for the per-theme btop.theme shot.
|
||||
# softGL may fail to start Ghostty — btop.png is best-effort then; the
|
||||
# file assertions above still prove the theme is baked into the guest.
|
||||
machine.execute("su - nomarchy -c 'pkill -x rofi' >/dev/null 2>&1 || true")
|
||||
machine.sleep(1)
|
||||
machine.execute(
|
||||
hy + " exec ghostty --gtk-single-instance=false -e btop' >/dev/null 2>&1"
|
||||
)
|
||||
machine.sleep(12)
|
||||
machine.screenshot("btop")
|
||||
'';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user