I call this "tinyradio" -- at seven lines of code, it's a tiny internet radio player. It reads a list of streams from ~/.config/tinyradio/stream-list, and uses mpg123 to play the stream you select. I included all the available streams from somafm, but you can delete some or add more if you like, and it should even work with .pls files from other players.
The script:
Code: Select all
#!/bin/bash
STREAM_FILE=~/.config/tinyradio/stream-list
[[ ! -f "$STREAM_FILE" ]] && echo "$STREAM_FILE does not exist" && exit 1
array=( $(cat "$STREAM_FILE") )
select opt in "${array[@]}"; do
mpg123 -@ "$opt"
break
done
Code: Select all
http://somafm.com/groovesalad.pls
http://somafm.com/lush.pls
http://somafm.com/earwaves.pls
http://somafm.com/deepspaceone.pls
http://somafm.com/spacestation.pls
http://somafm.com/missioncontrol.pls
http://somafm.com/dronezone.pls
http://somafm.com/poptron.pls
http://somafm.com/events.pls
http://somafm.com/dubstep.pls
http://somafm.com/indiepop.pls
http://somafm.com/folkfwd.pls
http://somafm.com/bagel.pls
http://somafm.com/digitalis.pls
http://somafm.com/sonicuniverse.pls
http://somafm.com/secretagent.pls
http://somafm.com/illstreet.pls
http://somafm.com/thetrip.pls
http://somafm.com/cliqhop.pls
http://somafm.com/covers.pls
http://somafm.com/u80s.pls
http://somafm.com/beatblender.pls
http://somafm.com/doomed.pls
If you are too lazy to add this yourself, I plan to include it in my next spin.