400s

pecha kucha timer
git clone git://git.pyratebeard.net/400s.git
Log | Files | Refs | README

timer (681B)


      1 #!/bin/sh
      2 
      3 # colours
      4 cyan="\e[36m"
      5 reset="\e[0m"
      6 
      7 progress() {
      8 	for ((k = 0; k <= 19 ; k++))
      9 	do
     10 	    echo -n " >"
     11 	    for ((i = 1 ; i <= k; i++)); do echo -n "▒▒▒"; done
     12 	    for ((j = i ; j <= 20 ; j++)); do echo -n "   "; done
     13 	    #v=$((k * 10))
     14 	    echo -n "< "
     15 	    echo -n "$k" $'\r'
     16 	    sleep 1
     17 	done
     18 	echo
     19 }
     20 
     21 clear
     22 echo -e "${cyan}
     23 		┬─┐┬─┐┌─┐┬ ┬┬─┐  ┬┌ ┬ ┐┌─┐┬ ┬┬─┐
     24 		│─┘├─ │  │─┤│─┤  ├┴┐│ ││  │─┤│─┤
     25 		┆  ┴─┘└─┘┆ ┴┘ ┆  ┆ ┘┆─┘└─┘┆ ┴┘ ┆
     26 ${reset}"
     27 
     28 for slide in $(seq 1 20) ; do
     29 	echo
     30 	progress
     31 	echo -ne "\e[2A"
     32 done