Add joke script to generate triangle messages
This commit is contained in:
parent
cd7ffa12e4
commit
ce261fa71f
1 changed files with 33 additions and 0 deletions
33
Perso/tri.sh
Executable file
33
Perso/tri.sh
Executable file
|
@ -0,0 +1,33 @@
|
|||
#/bin/bash
|
||||
|
||||
read input
|
||||
characters=$(echo "$input" | grep -oe ".")
|
||||
|
||||
message=""
|
||||
for char in $characters; do
|
||||
message="$message""$char"" "
|
||||
done
|
||||
|
||||
echo 3
|
||||
sleep 1
|
||||
echo 2
|
||||
sleep 1
|
||||
echo 1
|
||||
sleep 1
|
||||
|
||||
xdotool type "$message"
|
||||
xdotool key shift+enter
|
||||
|
||||
spaces=""
|
||||
for char in $characters; do
|
||||
if [ "$spaces" ]; then
|
||||
xdotool type "$char""$spaces"
|
||||
if [ "$char" = 'i' ] || [ "$char" = 'I' ] || [ "$char" = '1' ] || [ "$char" = 'J' ] || [ "$char" = 'j' ] || [ "$char" = 't' ] || [ "$char" = 'f' ]; then
|
||||
xdotool type " "
|
||||
fi
|
||||
xdotool type "$char"
|
||||
xdotool key shift+enter
|
||||
spaces="$spaces"" "
|
||||
fi
|
||||
spaces="$spaces"" "
|
||||
done
|
Loading…
Add table
Reference in a new issue