Skip to content

Instantly share code, notes, and snippets.

@DanielAugusto191
Created May 15, 2024 08:46
Show Gist options
  • Select an option

  • Save DanielAugusto191/f28424cef6057541bf484f8c3be4d816 to your computer and use it in GitHub Desktop.

Select an option

Save DanielAugusto191/f28424cef6057541bf484f8c3be4d816 to your computer and use it in GitHub Desktop.
Use scroll lock as auto clicker
#!/bin/bash
while true; do
scroll_lock=$(xset q | grep "Scroll Lock:" | awk '{print $NF}')
echo $scroll_lock
if [ "$scroll_lock" == "on" ]; then
xdotool mousedown 1
else
xdotool mouseup 1
fi
sleep 1
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment