dotfiles

My personal shell configs and stuff
git clone git://git.alex.balgavy.eu/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

commit 8248c0d72af4b4f7e69039e430cc2484c481662e
parent 3f89d5dc731302f48fadccc4db2ef976e5ebca8b
Author: Alex Balgavy <a.balgavy@gmail.com>
Date:   Sat, 28 Apr 2018 01:39:32 +0200

Radio script now uses external config file

Makes it easier to add radios.

Diffstat:
M.bin/radio | 26++------------------------
A.bin/radio-config | 53+++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 55 insertions(+), 24 deletions(-)

diff --git a/.bin/radio b/.bin/radio @@ -1,31 +1,9 @@ #!/bin/bash -## RADIO CONFIG (MOVE TO SEPARATE FILE) ## -# Drive RADIO - http://driveradio.be -drive_radio="http://streaming.radionomy.com/DRIVE" - -# Nightwave Plaza - http://plaza.one -nw_plaza="https://plaza.one/mp3" - -# Psystation -classic_goa="http://hestia2.cdnstream.com/1458_128" -prog_psy_trance="http://hestia2.cdnstream.com/1453_128" - -# SOMA FM # -groove_salad="https://somafm.com/groovesalad256.pls" # Ambient/downtempo -mission_control="https://somafm.com/missioncontrol.pls" # Ambient with sounds from space -the_trip="https://somafm.com/thetrip.pls" # Prog house/trance -beat_blender="https://somafm.com/beatblender.pls" # Deep house, downtempo chill -dub_step="https://somafm.com/dubstep256.pls" # Dubstep, dub -defcon="https://somafm.com/defcon256.pls" # Music for hacking -deep_space="https://somafm.com/deepspaceone.pls" # Deep ambient electronic/experimental - -############################################################################################################## +# Initial config, setting $radios and $radio_names +source radio-config ## MAIN SCRIPT ## -# TODO: load these dynamically -radios=($drive_radio $nw_plaza $groove_salad $mission_control $the_trip $beat_blender $dub_step $defcon $deep_space $classic_goa $prog_psy_trance) -radio_names=("Drive Radio" "Nightwave Plaza" "SOMA - Groove Salad" "SOMA - Mission Control" "SOMA - The Trip" "SOMA - Beat Blender" "SOMA - Dub Step" "SOMA - Defcon" "SOMA - Deep Space" "PSYSTATION - Classic Goa" "PSYSTATION - Progressive Psy Trance") VISUALISER=true while getopts ":n" opt; do diff --git a/.bin/radio-config b/.bin/radio-config @@ -0,0 +1,53 @@ +## RADIO CONFIG ## +# Drive RADIO - http://driveradio.be +drive_radio="http://streaming.radionomy.com/DRIVE" + +# Nightwave Plaza - http://plaza.one +nw_plaza="https://plaza.one/mp3" + +# Psystation +classic_goa="http://hestia2.cdnstream.com/1458_128" +prog_psy_trance="http://hestia2.cdnstream.com/1453_128" + +# 6forty +six_forty="http://54.173.171.80:8000/6forty" + +# SOMA FM # +groove_salad="https://somafm.com/groovesalad256.pls" # Ambient/downtempo +mission_control="https://somafm.com/missioncontrol.pls" # Ambient with sounds from space +the_trip="https://somafm.com/thetrip.pls" # Prog house/trance +beat_blender="https://somafm.com/beatblender.pls" # Deep house, downtempo chill +dub_step="https://somafm.com/dubstep256.pls" # Dubstep, dub +defcon="https://somafm.com/defcon256.pls" # Music for hacking +deep_space="https://somafm.com/deepspaceone.pls" # Deep ambient electronic/experimental + +#### END LIST ### +# Initialising the arrays +radios=( + $drive_radio + $nw_plaza + $groove_salad + $mission_control + $the_trip + $beat_blender + $dub_step + $defcon + $deep_space + $classic_goa + $prog_psy_trance + $six_forty +) +radio_names=( + "Drive Radio" + "Nightwave Plaza" + "SOMA - Groove Salad" + "SOMA - Mission Control" + "SOMA - The Trip" + "SOMA - Beat Blender" + "SOMA - Dub Step" + "SOMA - Defcon" + "SOMA - Deep Space" + "PSYSTATION - Classic Goa" + "PSYSTATION - Progressive Psy Trance" + "6forty radio - Post Rock" +)