Created
December 16, 2019 10:26
-
-
Save Lissy93/0e2af593dae398aee602d5c801189953 to your computer and use it in GitHub Desktop.
Quick script to periodically move the mouse. Many uses, such as avoiding Suspend to RAM Timeout, or more realistically keep status set to active while working from home π
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
# The mouse pointer will move around its current position on the screen, i.e. around any position | |
# on the screen where you place the pointer. However, if you prefer it to move around the centre | |
# of the screen then change mousemove_relative to mousemove in the xdotool command below. | |
# LENGTH is the amount of px the mouse will move | |
# 0 = not moving at all, 1 = tiny movement, 100 = giant movement | |
LENGTH=50 | |
# DELAY os the number of seconds, between movements | |
DELAY=5 | |
while true | |
do | |
for ANGLE in 0 90 180 270 | |
do | |
xdotool mousemove_relative --polar $ANGLE $LENGTH | |
sleep $DELAY | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment