Created
May 20, 2020 19:19
-
-
Save Luctins/ee9914c5b25079aa8aaa4cb520333530 to your computer and use it in GitHub Desktop.
A simple script that creates a string of oneko's that follow each other, $1 is the amount or if == a create all sprites, $2 is aditional param to first cat (like -tofocus)
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
#!/bin/bash | |
trap 'exit' INT | |
stop() | |
{ | |
killall oneko | |
exit | |
} | |
a=0 | |
if [[ -z "$1" ]]; then | |
n=3; | |
elif [[ "$1" == "a" ]]; then #show all characters | |
oneko -name neko -speed 25 $2 & | |
sleep 0.5 | |
oneko -tora -name tora -toname neko -position -32+32 & | |
sleep 0.5 | |
oneko -sakura -name sakura -toname tora -position +0+0 & | |
sleep 0.5 | |
oneko -tomoyo -name tomoyo -toname sakura -position +0+96 & | |
sleep 0.5 | |
oneko -dog -name dog -toname tomoyo -position +32+0 | |
else | |
n=$1 | |
fi | |
oneko -tora -tofocus -name tora & | |
oneko -name neko0 -toname tora -position +0+30 & | |
sleep 0.5 | |
for ((i = 0; i < $n ; i++)); do | |
if [[ "$i" -ne "$n" ]]; then | |
oneko -name "neko${i}" -toname "neko${a}" -position +0+30 & | |
else | |
oneko -name "neko${i}" -toname "neko${a}" -position +0+30 | |
fi | |
sleep 0.5 | |
let ++a | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment