diff --git a/bin/.bin/radio b/bin/.bin/radio index 9761b459..daa68eef 100755 --- a/bin/.bin/radio +++ b/bin/.bin/radio @@ -1,6 +1,13 @@ #!/usr/bin/env bash +# A little script to choose and play diffenent radio stations +# Currently uses mpv to play the them +# On first run it will download a list of radio stations +# To update them run radio -u + +# Change this if you want the radio stations to be saved somewhere else LIST="$HOME/.local/share/radioStations" +# Change this if you don't want to use mpv PLAY="mpv --input-ipc-server=/tmp/mpvsocket" function getRadioStations(){ @@ -23,7 +30,7 @@ function playStation(){ if [ ! -e "$LIST" ]; then getRadioStations fi - cat "$LIST" | fzf --no-preview | cut -d' ' -f3 | xargs $PLAY + echo -e "Name\tQuality\tURL" | cat - "$LIST" | fzf --header-lines=1 --delimiter="\t" --with-nth=1,2 --tabstop=30 --preview="echo {3}" --preview-window=top:1 | cut -d' ' -f3 | xargs -r $PLAY }