
Can close windows of a VM while it's paused, and can not accidentally harm dom0 by errant clicking. Discussion in https://github.com/QubesOS/qubes-issues/issues/881 Thanks to rustybird for suggested implementation.
11 lines
189 B
Bash
11 lines
189 B
Bash
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
ID=$(xdotool selectwindow)
|
|
|
|
xprop -id "$ID" _QUBES_VMNAME | grep -q ' = ' \
|
|
|| { echo "${0##* /}: Not killing dom0 window $ID" >&2; exit 1; }
|
|
|
|
xdotool windowkill "$ID"
|