Created
February 15, 2024 13:27
-
-
Save richhh7g/e4ed3eef0126397fc642776fccefd512 to your computer and use it in GitHub Desktop.
Shell - Slack online mode
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
#!/bin/bash | |
ANGLE=0 | |
RADIUS=100 | |
CENTER_X=1000 | |
CENTER_Y=1000 | |
INTERVAL=1 | |
ANGULAR_VELOCITY=1 | |
while true; do | |
MOUSE_X=$(echo "$CENTER_X + $RADIUS * s($ANGLE)" | bc -l) | |
MOUSE_Y=$(echo "$CENTER_Y + $RADIUS * c($ANGLE)" | bc -l) | |
xdotool mousemove --sync "$MOUSE_X" "$MOUSE_Y" | |
ANGLE=$(echo "$ANGLE + $ANGULAR_VELOCITY * $INTERVAL" | bc -l) | |
sleep "$INTERVAL" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment