scripts/printscreen

17 lines
405 B
Bash
Executable File
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/sh
## Try to use flameshot to get a screenshot
### See https://github.com/flameshot-org/flameshot
## Or try to use scrot
if [ "$(command -v flameshot)" ]; then
flameshot gui --path /tmp --delay 50
else ## Use scrot
# -s: Interactively select a window or rectangle with the mouse.
# -e: Directly open the screenshot with Gimp then delete it
scrot -s -m -e 'gimp $f ; mv $f /tmp/'
fi