The new assertion pinned /title:"Windows VM - Omarchy" with the quote sitting immediately after the colon. That quote is incidental shell syntax, not the title the Hyprland rule matches on. Open PR #7902 moves the RDP arguments into an array, where the same flag reads "/title:Windows VM - Omarchy", so the assertion would fail for whichever of the two pull requests merged second. Allow an optional quote after the colon. The assertion still fails if the title itself drifts, in either direction, which is the coupling it exists to protect. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
30 lines
1.2 KiB
Bash
30 lines
1.2 KiB
Bash
#!/bin/bash
|
|
|
|
set -euo pipefail
|
|
|
|
source "$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)/base-test.sh"
|
|
|
|
windows_vm_command="$ROOT/bin/omarchy-windows-vm"
|
|
windows_vm_rules="$ROOT/default/hypr/apps/windows-vm.lua"
|
|
|
|
rg -q '^ restart: "no"$' "$windows_vm_command" ||
|
|
fail "Windows VM uses manual startup by default"
|
|
pass "Windows VM uses manual startup by default"
|
|
|
|
if rg -q '^ restart: unless-stopped$' "$windows_vm_command"; then
|
|
fail "Windows VM does not restart automatically at boot"
|
|
fi
|
|
pass "Windows VM does not restart automatically at boot"
|
|
|
|
# Tolerate either shell quoting of the argument -- what must not drift is the
|
|
# title itself, since the Hyprland rule below matches on it.
|
|
rg -q 'title:"?Windows VM - Omarchy"' "$windows_vm_command" ||
|
|
fail "Windows VM launches FreeRDP with its expected title"
|
|
rg -q 'class = "\^xfreerdp\$", title = "\^Windows VM - Omarchy\$"' "$windows_vm_rules" ||
|
|
fail "Windows VM opacity rule targets its FreeRDP window"
|
|
rg -q 'tag = "-default-opacity"' "$windows_vm_rules" ||
|
|
fail "Windows VM opts out of default opacity"
|
|
rg -q 'opacity = "1 1"' "$windows_vm_rules" ||
|
|
fail "Windows VM stays fully opaque"
|
|
pass "Windows VM stays fully opaque"
|