On Tue, Jun 22, 2021 at 07:15:22PM -0500, Sven Semmler wrote: > Hi Michael, > > I don't have the time currently to figure this out and send you a working > solution. So instead I'll share things I know: > > 1) if you inquire the window property "_QUBES_VMNAME" of the active window, > you'll get the name of the qube > > 2) you should be able to get to this with wmctrl or maybe xdotool > > Then write a little bash script in dom0 and hook it up to a shortcut, is > what I think. > > Good luck! > > /Sven
Here's a script that does exactly this. Edit it to do something with $QUBE. Associate it with a shortcut. ``` #!/bin/bash ID=`xdotool getwindowfocus` QUBE=`xprop _QUBES_VMNAME -id $ID|cut -f2 -d\" ` if [[ "$QUBE" == "_QUBES_VMNAME: not found." ]]; then exit else # Do something with $QUBE fi ``` The if clause is to exclude dom0 windows, but you could adapt that if you *do* want action in dom0. unman -- You received this message because you are subscribed to the Google Groups "qubes-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to qubes-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/qubes-users/20210623101854.GA27860%40thirdeyesecurity.org.