Created
November 29, 2022 04:40
-
-
Save polypoyo/d46fba879549e55ae8cfcca3fb773cb5 to your computer and use it in GitHub Desktop.
stupid yourworldoftext gag
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
sleep 1; | |
window=$(xdotool selectwindow) | |
width=${1:-25} # pass an argument to specify a width | |
text="SPLATOON" # don't touch | |
text="$text$text$text$text$text$text$text$text$text" # duplicate the string a few times | |
text="$text$text$text$text$text$text$text$text$text" # so we can truncate it to /longer/ lengths | |
text=$(echo $text | head -c$width) # that's exactly what we do here, "truncate" it to a longer length. | |
while true; do | |
echo "typing $width letters" | |
# type out our text. we do this really slowly since lag is super common on web browsers | |
xdotool type --window $window --delay 500 $text | |
# go to next line | |
xdotool key --window $window Return | |
sleep 1 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment