Last active
January 6, 2024 00:38
-
-
Save shmup/7de83875a3208cb5a7018838bb331a5b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
player="cvlc --loop" | |
track="https://dev.host/~shmup/tmp/Melancholia_I.mp3" | |
aquarium="http://asciiquarium.live" | |
reset() { | |
tput cnorm; stty echo; tput sgr0; clear | |
} | |
clean() { | |
kill $audio $aquarium > /dev/null 2>&1 | |
reset | |
exit | |
} | |
trap clean SIGINT | |
curl -s $track | $player - &> /dev/null & | |
audio=$! | |
curl -s "$aquarium?cols=$(tput cols)&rows=$(tput lines)" & | |
aquarium=$! | |
wait $aquarium | |
clean |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment