diff options
author | William Harrington <kb0iic@berzerkula.org> | 2021-03-19 09:34:17 -0500 |
---|---|---|
committer | William Harrington <kb0iic@berzerkula.org> | 2021-03-19 09:34:17 -0500 |
commit | 2dd2e92180b146982611bce51bd645524a6a0208 (patch) | |
tree | 30fdfed10ed8bc672a0eaabc6d5fc7d51ffa54be | |
parent | b50934ac69436d0d9b1979f01e9c66ef3bfb398b (diff) |
Add different styles of spinners.
-rw-r--r-- | spinner.sh | 30 |
1 files changed, 26 insertions, 4 deletions
@@ -10,10 +10,32 @@ spinner() { tput civis # hide cursor printf "${WHT}" while [ -d /proc/$PROC ]; do - printf '\033[s\033[u[ / ] %s\033[u' "$str"; sleep "$delay" - printf '\033[s\033[u[ — ] %s\033[u' "$str"; sleep "$delay" - printf '\033[s\033[u[ \ ] %s\033[u' "$str"; sleep "$delay" - printf '\033[s\033[u[ | ] %s\033[u' "$str"; sleep "$delay" + #-\|/ + #⠁⠂⠄⡀⢀⠠⠐⠈ + #▁▂▃▄▅▆▇█▇▆▅▄▃▂▁ + #←↖↑↗→↘↓↙ + #▖▘▝▗ + #◢◣◤◥ + #┤┘┴└├┌┬┐ + #◰◳◲◱ + #◴◷◶◵ + #◐◓◑◒ + #⣾⣽⣻⢿⡿⣟⣯⣷ + printf '\033[s\033[u[ ▁ ] %s\033[u' "$str"; sleep "$delay" + printf '\033[s\033[u[ ▂ ] %s\033[u' "$str"; sleep "$delay" + printf '\033[s\033[u[ ▃ ] %s\033[u' "$str"; sleep "$delay" + printf '\033[s\033[u[ ▄ ] %s\033[u' "$str"; sleep "$delay" + printf '\033[s\033[u[ ▅ ] %s\033[u' "$str"; sleep "$delay" + printf '\033[s\033[u[ ▆ ] %s\033[u' "$str"; sleep "$delay" + printf '\033[s\033[u[ ▇ ] %s\033[u' "$str"; sleep "$delay" + printf '\033[s\033[u[ █ ] %s\033[u' "$str"; sleep "$delay" + printf '\033[s\033[u[ ▇ ] %s\033[u' "$str"; sleep "$delay" + printf '\033[s\033[u[ ▆ ] %s\033[u' "$str"; sleep "$delay" + printf '\033[s\033[u[ ▅ ] %s\033[u' "$str"; sleep "$delay" + printf '\033[s\033[u[ ▄ ] %s\033[u' "$str"; sleep "$delay" + printf '\033[s\033[u[ ▃ ] %s\033[u' "$str"; sleep "$delay" + printf '\033[s\033[u[ ▂ ] %s\033[u' "$str"; sleep "$delay" + printf '\033[s\033[u[ ▁ ] %s\033[u' "$str"; sleep "$delay" done wait ${PROC} retval=$? |