aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Harrington <kb0iic@berzerkula.org>2021-03-19 09:34:17 -0500
committerWilliam Harrington <kb0iic@berzerkula.org>2021-03-19 09:34:17 -0500
commit2dd2e92180b146982611bce51bd645524a6a0208 (patch)
tree30fdfed10ed8bc672a0eaabc6d5fc7d51ffa54be
parentb50934ac69436d0d9b1979f01e9c66ef3bfb398b (diff)
Add different styles of spinners.
-rw-r--r--spinner.sh30
1 files changed, 26 insertions, 4 deletions
diff --git a/spinner.sh b/spinner.sh
index 7a2c874..525bd9f 100644
--- a/spinner.sh
+++ b/spinner.sh
@@ -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=$?