Skip to content

Instantly share code, notes, and snippets.

@richhh7g
Created February 15, 2024 13:27
Show Gist options
  • Save richhh7g/e4ed3eef0126397fc642776fccefd512 to your computer and use it in GitHub Desktop.
Save richhh7g/e4ed3eef0126397fc642776fccefd512 to your computer and use it in GitHub Desktop.
Shell - Slack online mode
#!/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