check if convert and xdotool exists

This commit is contained in:
Marcus 2024-01-03 04:07:49 +01:00
parent f6579ea31e
commit 476b3f39bf

View file

@ -203,7 +203,7 @@ done
convertimg() { convertimg() {
command -v convert || message error "${YELLOW}convert${ENDCOLOR} not found"
if [ -n "$RESIZE" ] if [ -n "$RESIZE" ]
then then
RESIZE="-resize $RESIZE" RESIZE="-resize $RESIZE"
@ -231,7 +231,8 @@ shuf_xy() {
echo "OFFSET $(shuf -i $W-$(($W+10)) -n 1) $(shuf -i $H-$(($H+10)) -n 1)" echo "OFFSET $(shuf -i $W-$(($W+10)) -n 1) $(shuf -i $H-$(($H+10)) -n 1)"
;; ;;
cursor) echo "OFFSET $(xdotool getmouselocation | tr ':' ' '|awk '{print $2 " " $4}')" cursor) command -v xdotool || message error "${YELLOW}xdotool${ENDCOLOR} not found"
echo "OFFSET $(xdotool getmouselocation | tr ':' ' '|awk '{print $2 " " $4}')"
;; ;;
static|*) test -z $H && H=0 static|*) test -z $H && H=0