You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

26 lines
407 B

#!/bin/sh
has_param() {
local term="$1"
shift
for arg; do
if [[ $arg == "$term" ]]; then
echo 1
return
fi
done
echo 0
}
invert=$(has_param "-i" "$@")
echo $invert
tempdir=$(mktemp -d)
tempfile="${tempdir}/image.png"
resnap -s rm2 -p -o $tempfile -n
crop_rm2_image.py $tempfile $invert
xclip -selection clipboard -t image/png -i "$tempfile"