#!/bin/sh pkill xdotool && echo 'Killed old xclick process! Exiting...' && exit 0 delay=${1:-`seq 500 500 10000 | dmenu -p 'Delay between clicks (in milliseconds): '`} click=${2:-`seq -f'Button %g' 5 | dmenu -p 'Mouse click: ' | tr -cd '[:digit:]'`} xdotool click --delay $delay --repeat 2147483647 $click # signed 32-bit integer limit is probably enough clicks since xdotool doesn't have an infinite repeat option