#!/bin/bash
case "$1" in
"help"|'(or'|"no arguments}"|"") echo -e \
"Usage: `basename $0`  [--speed=0.1]
smaller --speed = faster spinner, it's filtered to always be less than 0 though, standard \`sleep\` suffixes apply

You can use following arguments: ";grep '" )' $0|grep -v "following"|cut -d")" -f1|tr -d '"'|sort|nl -s ": "|tr -s "|"|tr -s '"'|tr -d "'"|tr "|" " "|tr "}" ")" ;;
"dusty" )        echo 'dusty ⁘⁛⁘⁙ @speed=0.1'; speed=0.1; a='⁘⁛⁘⁙';;
"blinky" )          echo 'blinky ◇◈◆◈'; a='◇◈◆◈';speed=0.1;;
"arrows" ) speed=0.1; echo "←⇠←↖↑⇡↑↗→⇢→↘↓⇣↓↙"; a='←⇠←↖↑⇡↑↗→⇢→↘↓⇣↓↙';;
"squiggles" )       speed=0.1; echo "$1";a="∼∽∿";;#last char doesn't work when highlighted????
"fishies_1" )   speed=0.1; echo "$1";a="<≪<>≫>"^same???;;
"fishies_2" )  speed=0.1; echo "$1";a="<≪≺≻≫>";;
"fishies_3" )   speed=0.1; echo "$1";a="<≪⋘⋙≫>";;
"boxes" )   speed=0.1; echo "$1";a="⊏⊓⊐⊔";;
"t-spin" )        speed=0.1; echo "$1";a="⊢⊤⊣⊥";;
"ellipsis" )    speed=0.1; echo "$1";a="⋮⋰⋯⋱";;
"stix" )     speed=0.1; echo "$1";a="╱╳╲╳";;
"spin-tix" )    speed=0.1; echo "$1";a="╴╵╶╷╸╹╺╻";;
"spindl" )        speed=0.1; echo "$1";a="╭╮╯╰";;
"lit" )            speed=0.1; echo "$1";a="╀╄┾╆╁╅┽╃";;
"elitric" )     speed=0.1; echo "$1";a="┌┍┎┏┗┖┕└┘┙┚┛┓┒┑┐";;
"qyuut" )          speed=0.1; echo "$1";a="╺╼╾╸╾";;
"smooth_moves" )     speed=0.1; echo "$1";a="▁▂▃▄▅▆▇█▉▊▋▌▍▎▏▏▎▍▌▋▊▉█▇▆▅▄▃▂▁";;
"blinkenlights" )     speed=0.1; echo "$1";a="░▒▓█▓▒";;
"loading" )          speed=0.1; echo "$1";a="▖▄▗▐▝▀▘▌";;
"loadin8" )     speed=0.1; echo "$1";a="▏▔▕▁";;
"jumper" )      speed=0.1; echo "$1";a="▚▄▞▀";;
"blink" )    speed=0.1; echo "$1";a="■▢▣□▢";;
"spin_tv" )          speed=0.1; echo "$1";a="▤▤▦▧▧▩▥▥▦▨▨▩";;
"triangles" ) speed=0.1; echo "$1";a="▲△▵▴▸▹▶▷▽▼▾▿◃◂◀◁";;
"doritos" )          speed=0.1; echo "$1";a="▴▸▾◂";;
"blinkenround" )    speed=0.1; echo "$1";a="◌○◎◍●◎◌";;
"spindl_o" )    speed=0.1; echo "$1";a="◜◝◞◟";;
"tortillas" )     speed=0.1; echo "$1";a="◢◣◤◥";;
"swapilla" )     speed=0.1; echo "$1";a="◢◺◤◹◿◣◸◥";;
"bagua" )       speed=0.1; echo "$1";a="☰☱☲☳☴☵☶☷";;
"musical" )    speed=0.1; echo "$1";a="♩♪♫♬♫♪";;
"re-sin" )    speed=0.1; echo "$1";a="♳♴♵♶♷♸♹♺";;
"die" )      speed=0.1; echo "$1";a="⚀⚁⚂⚃⚄⚅";;
"Xistance" ) speed=0.1; echo "$1";a="/X\\";;
"yinyan" )     speed=0.1; echo "$1";a="⚊⚋";;
"drippong" )   speed=0.1; echo "$1";a="˙\`´:.";;
"H_flip" )       speed=0.1; echo "$1";a="┄┅";;
"V_flip" )      speed=0.1; echo "$1";a="┆┇";;
"H_flip2" )   speed=0.1; echo "$1";a="┄┈";;
"V_flip2" ) speed=0.1; echo "$1";a="┊┋";;
"piston" ) echo "$1";speed=0.05;a='▁▂▃▄▅▆▇███▇▆▅▄▃▂▁';;
esac
case "$2" in
"--speed="*) sleep=`echo $2|cut -d"=" -f2-|sed -E 's/.*\.//g'|sed 's/^/0./'`;echo $sleep;;
#*) time=$speed
esac
if test -z "$2";then time=$speed;else time=$sleep;fi
if test -n "$1";then i=j=1;sp=$a;while true;do 
printf "\e[2G${sp:j--%${#sp}:1} loader%% ${sp:i++%${#sp}:1}\e[J ";sleep $time;done;fi