fix: Add CachyOS test VM dev environment and VM testing skill

QEMU/KVM scripts for a CachyOS KDE test VM (run.sh/run.ps1, get-iso,
guest SSH setup), host helper scripts to drive and inspect the
cachyos-gamescope-boot wizard in the guest, and a Claude Code skill
documenting the test workflow.
This commit is contained in:
theupriser committed 2026-09-23 15:14:17 +02:00
commit 97c5c569c8
13 files changed
+562

No files matched your search

Executable
+25
View File
@@ -0,0 +1,25 @@
#!/bin/bash
# Diff the guest's KDE/GTK configs against a saved baseline.
# scripts/cmp.sh save copy the current ~/.config files to the baseline
# scripts/cmp.sh show differences against the baseline
# Env: VM_USER (theupriser), VM_PORT (2222), VM_HOST (localhost),
# BASELINE (guest dir, default ~/.cache/vm-baseline; not /tmp, which is cleared on reboot).
set -euo pipefail
. "$(dirname "$0")/common.sh"
mode="${1:-diff}"
# The guest login shell is fish, so pass values in through the bash script itself.
{ printf 'mode=%q base=%q\n' "$mode" "${BASELINE:-}"; cat << 'REMOTE'
base="${base:-$HOME/.cache/vm-baseline}"
files="kdeglobals plasmarc plasmashellrc kwinrc kwinrulesrc konsolerc kscreenlockerrc kglobalshortcutsrc gtk-3.0/settings.ini gtk-4.0/settings.ini plasma-org.kde.plasma.desktop-appletsrc"
if [ "$mode" = save ]; then
for f in $files; do mkdir -p "$(dirname "$base/config/$f")"; cp -f ~/.config/"$f" "$base/config/$f" 2>/dev/null || true; done
echo "baseline saved to $base"; exit 0
fi
noise='^(ColorSchemeHash|popupHeight|popupWidth|ItemGeometries|ItemGeometriesHorizontal|DialogHeight|DialogWidth|[0-9]+ screens: )'
for f in $files; do
d=$(diff <(sort -u "$base/config/$f" 2>/dev/null | grep -vE "$noise") <(sort -u ~/.config/"$f" 2>/dev/null | grep -vE "$noise") | grep '^[<>]' || true)
[ -n "$d" ] && { echo "== $f"; echo "$d" | head -25; }
done
echo "(end of diff)"
REMOTE
} | vm_ssh bash -s 2>&1
+5
View File
@@ -0,0 +1,5 @@
# Sourced by the other scripts: SSH target of the test VM.
VM_USER="${VM_USER:-theupriser}"
VM_PORT="${VM_PORT:-2222}"
VM_HOST="${VM_HOST:-localhost}"
vm_ssh() { ssh -p "$VM_PORT" -o BatchMode=yes "$VM_USER@$VM_HOST" "$@"; }
+21
View File
@@ -0,0 +1,21 @@
#!/bin/bash
# Run the wizard inside the guest's Plasma session with scripted menu input.
# scripts/vmrun.sh '<menu input>' e.g. scripts/vmrun.sh '\ny\nn\n'
# Input is interpreted by printf: numbers toggle, empty line continues,
# a = re-apply, q = quit; then y for "Go ahead?" and n for the restart question.
# Env: VM_USER (theupriser), VM_PORT (2222), VM_HOST (localhost),
# GUEST_REPO (/mnt, where the repo is mounted in the guest), GUEST_UID (1000).
set -euo pipefail
. "$(dirname "$0")/common.sh"
input="${1:?usage: $0 '<menu input>'}"
GUEST_REPO="${GUEST_REPO:-/mnt}"
GUEST_UID="${GUEST_UID:-1000}"
# The guest login shell is fish, so pass values in through the bash script itself.
{ printf 'input=%q repo=%q uid=%q\n' "$input" "$GUEST_REPO" "$GUEST_UID"; cat << 'REMOTE'
export XDG_RUNTIME_DIR=/run/user/$uid WAYLAND_DISPLAY=wayland-0 DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$uid/bus
log=/tmp/wizard.log
# shellcheck disable=SC2059
printf "$input" | "$repo/setup-gamescope-boot.sh" > "$log" 2>&1; echo "exit=$?" >> "$log"
cat "$log"
REMOTE
} | vm_ssh bash -s 2>&1 | sed 's/\x1b\[[0-9;]*m//g'
+22
View File
@@ -0,0 +1,22 @@
#!/bin/bash
# Print the state of every wizard component in the guest.
# Env: VM_USER (theupriser), VM_PORT (2222), VM_HOST (localhost).
set -euo pipefail
. "$(dirname "$0")/common.sh"
vm_ssh bash -s << 'REMOTE' 2>&1
yn() { [ -e "$1" ] && echo y || echo n; }
echo "DM=$(systemctl show -p Id --value display-manager) sddm-autologin=$(yn /etc/sddm.conf.d/10-gamescope-autologin.conf) sync=$(yn /etc/systemd/system/sync-steamos-session.path) sudoers=$(sudo test -f /etc/sudoers.d/gamescope-session-switch && echo y || echo n)"
echo "plasmalogin [Autologin]: $(sed -n '/^\[Autologin\]/,/^\[/p' /etc/plasmalogin.conf | grep -v '^\[' | tr '\n' ' ')"
echo "shortcut=$(grep -h Exec= ~/Desktop/*Gaming*.desktop 2>/dev/null || echo none)"
echo "steam-unit=$([ -f ~/.config/systemd/user/steam-desktop-autostart.service ] && systemctl --user is-enabled steam-desktop-autostart.service || echo none) glyphs=$(yn ~/.config/environment.d/99-gamescope-steam-glyphs.conf)"
echo "lnf=$(kreadconfig6 --file kdeglobals --group KDE --key LookAndFeelPackage) scheme=$(kreadconfig6 --file kdeglobals --group General --key ColorScheme) gtk=$(kreadconfig6 --file ~/.config/gtk-3.0/settings.ini --group Settings --key gtk-theme-name) font=$(kreadconfig6 --file kdeglobals --group General --key font)"
echo "lock_screen=$(kreadconfig6 --file kdeglobals --group 'KDE Action Restrictions' --key action/lock_screen) autolock=$(kreadconfig6 --file kscreenlockerrc --group Daemon --key Autolock) metaL=$(kreadconfig6 --file kglobalshortcutsrc --group ksmserver --key 'Lock Session' | cut -c1-12)"
echo "panel: $(grep -A1 '^\[PlasmaViews\]\[Panel [0-9]*\]$' ~/.config/plasmashellrc | grep floating | tr '\n' ' ') $(grep -h 'thickness' ~/.config/plasmashellrc | tr '\n' ' ')"
echo "kickoff: $(grep -E '^(primaryActions|systemFavorites|icon)=' ~/.config/plasma-org.kde.plasma.desktop-appletsrc | tr '\n' ' ')"
echo "leds-pkg=$(pacman -Q leds-valve-dkms-git 2>/dev/null || echo none) steamos-manager=$(pacman -Q steamos-manager 2>/dev/null || echo none)/$(systemctl is-active steamos-manager 2>/dev/null) udev=$(yn /etc/udev/rules.d/70-valve-leds-user.rules) module=$(lsmod | grep -c leds_valve) leds=$(ls /sys/class/leds | grep -c valve)"
echo "leds-owner=$(stat -c %U /sys/class/leds/valve-leds*/brightness 2>/dev/null | sort -u | tr '\n' ' ')"
j=~/.local/state/cachyos-gamescope-boot
echo "journals: $(ls "$j" 2>/dev/null | tr '\n' ' ')"
for f in "$j"/*; do [ -f "$f" ] || continue; d=$(cut -f1-3 "$f" | sort | uniq -d); [ -n "$d" ] && echo "DUPLICATES in $(basename "$f"): $d"; done
true
REMOTE