mirror of
https://github.com/theupriser/steamify-cachyos-dev.git
synced 2026-10-05 12:45:56 +02:00
feat: vmcec.sh tests HDMI-CEC against a fake TV; vmwake.sh wakes the VM over QMP
run.sh opens a QMP socket; the skill documents the CEC test and its gotchas.
This commit is contained in:
1 parent
e04db1ec5f
commit
04204f1b9d
4 files changed
+277
-21
No files matched your search
Executable
+11
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
# Wake the VM from sleep (suspend to RAM), e.g. after the TV's power button
|
||||
# in the HDMI-CEC test. Uses the QMP socket run.sh opens in the VM directory.
|
||||
# Env: VM_DIR (the repo if it holds disk.qcow2, else ~/vms/cachyos-test).
|
||||
set -euo pipefail
|
||||
here="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
VM_DIR="${VM_DIR:-$([[ -f "$here/disk.qcow2" ]] && echo "$here" || echo "$HOME/vms/cachyos-test")}"
|
||||
sock="$VM_DIR/qmp.sock"
|
||||
[[ -S "$sock" ]] || { echo "No QMP socket at $sock (VM not running, or started before run.sh had -qmp)." >&2; exit 1; }
|
||||
printf '%s\n' '{"execute":"qmp_capabilities"}' '{"execute":"system_wakeup"}' |
|
||||
socat -t 2 - UNIX-CONNECT:"$sock" 2>/dev/null | grep -c '"return"' >/dev/null && echo "Wake-up sent."
|
||||
Reference in new issue
Block a user