From 476b3f39bf78019ba321ea62999da56f1fddc428 Mon Sep 17 00:00:00 2001 From: Marcus Date: Wed, 3 Jan 2024 04:07:49 +0100 Subject: [PATCH] check if convert and xdotool exists --- pixelfloot_bash.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pixelfloot_bash.sh b/pixelfloot_bash.sh index 9b31ab3..a566ed2 100755 --- a/pixelfloot_bash.sh +++ b/pixelfloot_bash.sh @@ -203,7 +203,7 @@ done convertimg() { - + command -v convert || message error "${YELLOW}convert${ENDCOLOR} not found" if [ -n "$RESIZE" ] then 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)" ;; - 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