Skip to content

Commit

Permalink
qvm-terminal: avoid searching through $PATH for xprop
Browse files Browse the repository at this point in the history
  • Loading branch information
rustybird committed Feb 23, 2025
1 parent 6dd296c commit 048fbaf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dom0/bin/qvm-terminal
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ vm_terminal=(

# no arguments - active window determines the VM in which to open a terminal
if [[ $# == 0 ]]; then
win_output=$(LC_ALL=C xprop -root -notype _NET_ACTIVE_WINDOW)
win_output=$(LC_ALL=C /usr/bin/xprop -root -notype _NET_ACTIVE_WINDOW)
win_regex='^_NET_ACTIVE_WINDOW: window id # (0x[0-9a-f]+)'
[[ "$win_output" =~ $win_regex ]]
win=${BASH_REMATCH[1]}

vm_output=$(LC_ALL=C xprop -id "$win" -notype _QUBES_VMNAME)
vm_output=$(LC_ALL=C /usr/bin/xprop -id "$win" -notype _QUBES_VMNAME)
vm_regex='^_QUBES_VMNAME = "([^"]+)"$'
[[ "$vm_output" =~ $vm_regex ]]
vm=${BASH_REMATCH[1]}
Expand Down

0 comments on commit 048fbaf

Please sign in to comment.