Skip to content

Instantly share code, notes, and snippets.

@Kixunil
Created May 7, 2020 14:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Kixunil/c78bb80d3d00a8f75f4ceab03d9d5578 to your computer and use it in GitHub Desktop.
Save Kixunil/c78bb80d3d00a8f75f4ceab03d9d5578 to your computer and use it in GitHub Desktop.
xprop -spy -root -notype _NET_ACTIVE_WINDOW | sed -ue 's/^.*# //' -e 's/,.*$//' | while read id; do focused_vm="`xprop -notype -id $id _QUBES_VMNAME 2>/dev/null | cut -d '"' -f 2`"; test "$focused_vm" = "_QUBES_VMNAME: not found." && focused_vm=dom0; test -n "$focused_vm" && echo "`date +%s` $focused_vm"; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment