Lets the user take a screenshot based on rectangular selection and sends it to the currently focused VM
#!/bin/sh
# lets the user take a screenshot based on rectangular selection and sends it to the currently focused VM
CUR_WIN_ID=`xdotool getwindowfocus`
CUR_VM=`xprop _QUBES_VMNAME -id $CUR_WIN_ID | cut -d \" -f 2`
if [[ "$CUR_VM" != "_QUBES_VMNAME: not found." ]]; then
xfce4-screenshooter -r -o "qvm-copy-to-vm $CUR_VM"
notify-send "Screenshot sent!" "Your selection has been sent as a screenshot to $CUR_VM!"
fi