I created a script to type a random string of numbers by binding it to a hotkey:
#!/bin/bash ran="$(shuf -i 100000-999999 -n 1)" sleep .2 xdotool type --delay 12 "untitled_$ran "
For some reason, the
xdotool command will not do anything for the first tenth of a second or so. If there is no
sleep, nothing is typed. If the
sleep command is shorter, fewer than six characters are typed. It's as if the command runs, but is ignored for the first few moments after the script is executed.
Why does this happen, and how can I resolve this?