Skip to content

Instantly share code, notes, and snippets.

@d6e
Last active September 16, 2021 23:38
Show Gist options
  • Save d6e/e9cb77da6946eacf9ca014e3a7e8dbbf to your computer and use it in GitHub Desktop.
Save d6e/e9cb77da6946eacf9ca014e3a7e8dbbf to your computer and use it in GitHub Desktop.
Some simple shell function for playing music from my terminal. This actually lives in my .zshrc
function listen() {
case "$1" in
"soma")
mplayer -playlist <(curl -s https://somafm.com/$2.pls)
;;
"bassdrive")
mplayer -playlist <(curl -s https://bassdrive.com/bassdrive.m3u)
;;
"ocean")
play -n synth brownnoise synth pinknoise mix synth sine amod 0.1 10
;;
*)
echo "Usage: listen <station> <channel>"
;;
esac
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment