Created
April 3, 2021 06:57
-
-
Save satishgumudavelli/69e721c3db0af0b04e4de277b74cf080 to your computer and use it in GitHub Desktop.
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
#requires: | |
# 'xprintidle' for inactivity check (in ms) | |
# 'rand' for generating random number (screen resolution) | |
# 'xdotool' to move the mouse pointer | |
#parameters: | |
# 100000 idle time in ms before executing the mousemove | |
# 800 / 600: your screen resolution, at at least the moving range for the mouse pointer | |
while :; do | |
if [ $(xprintidle) -gt 2000 ] | |
then | |
xdotool mousemove `rand -M 800` `rand -M 600`; | |
fi | |
sleep 2 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment