Created
June 24, 2020 22:39
-
-
Save pawiromitchel/5ce85d808ddeab618d03d3fdca5d5b49 to your computer and use it in GitHub Desktop.
Automove mouse in Linux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# infinite loop, press Ctrl + C to stop | |
while : | |
do | |
# get a random number between -200 and 200 for X and Y | |
x=$((-200 + RANDOM % 200)) | |
y=$((-200 + RANDOM % 200)) | |
sleep=$((1 + RANDOM % 5)) | |
echo "sleep for" $sleep "seconds" | |
sleep $sleep | |
echo "x" $x "y" $y | |
# move the mouse randomly | |
xdotool mousemove_relative --sync -- $x $y | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment