Skip to content

Instantly share code, notes, and snippets.

@mitchellh
Created July 23, 2025 23:40
Show Gist options
  • Save mitchellh/73777dc99c3ba6d3393690d01a6bd93a to your computer and use it in GitHub Desktop.
Save mitchellh/73777dc99c3ba6d3393690d01a6bd93a to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
counter=1
echo "demo: error state"
while [ $counter -le 25 ]; do
printf "\x1b]9;4;2;${counter}\x07"
((counter++))
sleep 0.1
done
echo "demo: normal state"
while [ $counter -le 50 ]; do
printf "\x1b]9;4;1;${counter}\x07"
((counter++))
sleep 0.1
done
echo "demo: pulsing"
while [ $counter -le 75 ]; do
printf "\x1b]9;4;3\x07"
((counter++))
sleep 0.1
done
echo "demo: normal state"
while [ $counter -le 100 ]; do
printf "\x1b]9;4;1;${counter}\x07"
((counter++))
sleep 0.1
done
printf "\x1b]9;4;0\x07"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment