Skip to content

Instantly share code, notes, and snippets.

@neuthral
Last active March 24, 2025 14:37
Show Gist options
  • Save neuthral/7258837e3e1f48c346c4fd289294798f to your computer and use it in GitHub Desktop.
Save neuthral/7258837e3e1f48c346c4fd289294798f to your computer and use it in GitHub Desktop.
click macro for cheating or saving your mouse buttons
#!/bin/bash
while true
do
NUMLOCK=$(numlockx status)
if [ "$NUMLOCK" == "Numlock is on" ]
then
xdotool click --delay $(( ( RANDOM % $1 ) + 1 )) 1 > /dev/null 2>&1
fi
done
###### requires numlockx and xdotool
##### usage ./clickmacro <delay> then use numlock to pause and start
## ./clickmacro 300
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment