Skip to content

Instantly share code, notes, and snippets.

@ziotom78
Created December 23, 2023 08:27
Show Gist options
  • Save ziotom78/2056c4c2c325910fad908d5218058fd6 to your computer and use it in GitHub Desktop.
Save ziotom78/2056c4c2c325910fad908d5218058fd6 to your computer and use it in GitHub Desktop.
A Bash script that types what's inside the clipboard after some amount of time
#!/bin/bash
if [ "$1" == "" ]; then
cat <<EOF
Paste the contents of the keyboard as if they were typed using the keyboard
Usage: $(basename $0) WAIT_TIME
where WAIT_TIME is the delay, like "3s" (three seconds)
EOF
exit 1
fi
readonly wait_time="$1"
sleep $wait_time && xdotool type "$(xclip -o)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment