Created
May 22, 2020 19:03
-
-
Save valarauca/881f4cd9aa2a3251f2024970e3a78874 to your computer and use it in GitHub Desktop.
causes your mouse to move so you look online
This file contains hidden or 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
#!/bin/bash | |
hash xdotool &>/dev/null || { | |
echo -e "failed to find xdotool.\nPlease install xdotool" >&2; | |
exit 1; | |
} | |
function move_mouse() { | |
declare -i distance="${1}" | |
declare -i angle="${2}" | |
xdotool mousemove_relative --polar "${angle}" "${distance}" | |
} | |
function main() { | |
for ((;;)); do | |
local random_angle="$(shuf -i1-360 -n1)" | |
local random_distance="$(shuf -i1-5 -n1)" | |
move_mouse "${random_angle}" "${random_distance}" | |
sleep 30s | |
done | |
} | |
main |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment