qvm-screenshot-tool
qvm-screenshot-tool copied to clipboard
Suggestions
I am using this script on my Qubes 4.0. I wanted to add a hotkey for a region screenshot, bypassing the first dialog. However, scrot misbehaves and no screenshot is taken if the command is executed from the hotkey.
My solution was:
Replace scrot with xfce4-screenshooter. It is natively installed in dom0 and does not have this problem
In particular, replace this line:
scrot -s -b "$destination"
for
xfce4-screenshooter -r -o cat > "$destination"
Possible drawback: xfce4-screenshooter can't screenshot a window by clicking on it. Personally, I am more than OK with this tradeoff
At the very least it would be nice to add xfce4-screenshooter as a shortcut-safe option (at least for 4.0 users, I don't know if maim has this problem or not).
Some other suggestions I have: Add short handles for all or most of the options (-f for --fullscreen, -u for --upload-to-appvm-only, etc)
Make it possible to blacklist certain VMs from upload choices. This would make the VM selection more straightforward for users, with fewer options to chose from each time a screenshot is taken. I implemented this by editing this line:
choiceappvm=$(qvm-ls --raw-list |sed 's/\([^ ]*\)/FALSE \1 /g')
into
choiceappvm=$(qvm-ls --raw-list | sed -e "$(sed 's:.*:s/^&$//:' $DOM0_SHOTS_DIR/blacklist)" | sed '/^$/d' | sed 's/\([^ ]*\)/FALSE \1 /g')
(this code is based on the QubesOS-contrib fork, but the same logic should apply here)
And a final suggestion to edit this issue for the 1697th time: Add an option to copy the screenshot to the app VM's clipboard.