mirror of https://github.com/Chizi123/Scripts.git

Joel Grunbaum
2021-07-27 ea9da2c385dde48411e0500d10a778cbde000896
added ydotool for wayland
1 files modified
9 ■■■■ changed files
autoclick.sh 9 ●●●● patch | view | raw | blame | history
autoclick.sh
@@ -1,5 +1,11 @@
#!/bin/sh
if [ "$XDG_SESSION_TYPE" = "wayland" ]; then
    TOOL=ydotool
else
    TOOL=xdotool
fi
if [ "$(pgrep autoclick | wc -l)" = "2" ]; then 
    true
else
@@ -7,6 +13,7 @@
fi
while :; do
    xdotool click --delay 100 --repeat 10 1
    $TOOL click 1
    sleep 0.1
done