feat: complete and visually audit the Hyprland workstation

Refresh system/tool pins, install official Element Nightly, expand development tools, and finish desktop workflows with a shared charcoal/gold design. Retain host-specific updates and NixOS recovery generations.
This commit is contained in:
OpenAI Coding Assistant
2026-09-05 23:22:27 -05:00
parent 35ac95651d
commit 527d989a01
26 changed files with 2043 additions and 447 deletions
+63 -7
View File
@@ -35,7 +35,8 @@ def screenshot(name):
def launch(name, command):
user("systemd-run --quiet --user --collect --unit=audit-" + name + " " + command)
# Match UWSM's application lifetime: clipboard owners can outlive main PID.
user("systemd-run --quiet --user --collect --property=ExitType=cgroup --unit=audit-" + name + " " + command)
machine.start()
@@ -45,8 +46,7 @@ try:
"runuser -u dev -- env XDG_RUNTIME_DIR=/run/user/1001 "
"systemctl --user is-active graphical-session.target", timeout=180
)
# Mako is D-Bus activated on the first notification, not eagerly started.
for unit in ["ashell", "awww", "hypridle", "hyprpolkitagent", "pipewire", "wireplumber"]:
for unit in ["ashell", "awww", "hypridle", "hyprpolkitagent", "pipewire", "wireplumber", "swaync", "hyprsunset", "desktop-clipboard", "anyrun"]:
machine.wait_until_succeeds(
"runuser -u dev -- env XDG_RUNTIME_DIR=/run/user/1001 "
"systemctl --user is-active " + unit + ".service", timeout=60
@@ -78,7 +78,7 @@ launch("terminal", "kitty --title 'Workspace ready' sh -c " + shlex.quote(
"printf '\\n WORKSPACE READY\\n\\n'; "
"zsh --version; kitty --version; git --version; printf 'Pi: '; command -v pi; "
"printf '\\n Ctrl-R history | Ctrl-T files\\n'; "
"printf ' Alt-C directories | Super-Space launcher\\n'; "
"printf ' Alt-C directories | Super-D launcher\\n'; "
"printf ' Super-Enter terminal | Super-F fullscreen\\n\\n'; exec zsh -i"
))
launch("monitor", "kitty --title 'System monitor' -e btop")
@@ -88,13 +88,46 @@ screenshot("desktop-100")
launch("launcher", "anyrun")
wait_layer("anyrun")
machine.sleep(5)
machine.sleep(2)
screenshot("launcher-empty-100")
machine.send_chars("kitty", delay=0.1)
machine.sleep(5)
screenshot("launcher-100")
machine.send_key("esc")
# Exercise clipboard through the actual picker, not only mocked byte handling.
session("desktop clipboard-clear")
launch("clipboard-source", "sh -c " + shlex.quote("printf 'clipboard audit marker' | wl-copy --foreground"))
machine.wait_until_succeeds(as_user("test -s /run/user/1001/workstation/clipboard.db"), timeout=30)
launch("clipboard", "desktop clipboard")
wait_layer("launcher")
machine.send_key("ret")
machine.sleep(1)
assert session("wl-paste --no-newline") == "clipboard audit marker"
# Record only this disposable desktop; no host screen/audio is captured.
launch("record", "desktop record")
wait_layer("launcher")
machine.send_key("down") # current output, no audio
machine.send_key("ret")
machine.wait_until_succeeds(as_user("systemctl --user is-active desktop-recording.service"))
machine.sleep(3)
assert session("swaync-client -I -sw").strip() == "true"
screenshot("recording-indicator-100")
session("desktop record")
assert session("swaync-client -I -sw").strip() == "false"
video = session('cat "$XDG_RUNTIME_DIR/workstation/recording-file"').strip()
probe = json.loads(session("ffprobe -v error -show_streams -of json " + shlex.quote(video)))
assert any(stream["codec_type"] == "video" for stream in probe["streams"])
assert not any(stream["codec_type"] == "audio" for stream in probe["streams"])
session("notify-send 'Desktop ready' 'Readable text, working audio and native Wayland services.'")
assert '"mako"' in user("busctl --user call org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications GetServerInformation")
assert "sway" in user("busctl --user call org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications GetServerInformation").lower()
assert "Clipboard" in session("desktop-help --print")
session("swaync-client -t -sw")
machine.sleep(1)
screenshot("notification-center-100")
session("swaync-client -t -sw")
machine.sleep(1)
screenshot("notification-100")
@@ -105,6 +138,26 @@ session("hyprctl eval " + shlex.quote(
))
machine.sleep(4)
assert json.loads(session("hyprctl -j monitors"))[0]["scale"] == 1.5
launch("launcher150", "anyrun")
wait_layer("anyrun")
machine.sleep(2)
screenshot("launcher-empty-150")
# closeOnClick uses a transparent full-screen catcher; its IPC dimensions are
# not the visible palette's bounds. Audit the rendered six-result screenshot.
machine.send_chars("e")
machine.sleep(1)
screenshot("launcher-results-150")
session("anyrun close")
launch("help150", "desktop-help")
wait_layer("launcher")
machine.sleep(1)
screenshot("help-150")
machine.send_key("esc")
launch("actions150", "desktop menu")
wait_layer("launcher")
machine.sleep(1)
screenshot("actions-150")
machine.send_key("esc")
# At 150%, a half-screen btop is below its 80-column minimum: use Super-F.
# Closing the launcher can restore focus to either terminal; select btop explicitly.
monitor = next(c for c in json.loads(session("hyprctl -j clients")) if c["initialTitle"] == "System monitor")
@@ -127,6 +180,7 @@ machine.succeed("pgrep -u dev hyprlock")
machine.send_chars("desktop-test")
machine.send_key("ret")
machine.wait_until_fails("pgrep -u dev hyprlock", timeout=30)
assert user('test ! -e /run/user/1001/workstation/locked; test ! -e /run/user/1001/workstation/clipboard.db') == ""
# Restore scale before inspecting settings and ordinary application windows.
session("hyprctl eval " + shlex.quote(
@@ -142,7 +196,9 @@ screenshot("audio-controls")
# Preferences must not be a read-only Home Manager symlink.
user("test -w ~/.config/keepassxc/keepassxc.ini && test ! -L ~/.config/keepassxc/keepassxc.ini")
user("grep -q 'UpdateBinaryPath=false' ~/.config/keepassxc/keepassxc.ini")
user("grep -q -- '--password-store=gnome-libsecret' \"$(command -v element-desktop)\"")
user("grep -q -- '--password-store=gnome-libsecret' \"$(command -v element-desktop-nightly)\"")
user("test -f /etc/profiles/per-user/dev/share/applications/element-desktop-nightly.desktop")
user("test ! -e /etc/profiles/per-user/dev/share/applications/element-desktop.desktop")
user("grep -Eq 'fade_on_empty *= *false' ~/.config/hypr/hyprlock.conf")
assert "libapplications.so" in user("cat ~/.config/anyrun/config.ron")
session("hyprctl clients")