You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

radio 1.4KB

4 years ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. #!/usr/bin/zsh
  2. radios=(Random
  3. Fuzzy
  4. Ambiance
  5. AcidJazz
  6. Jazz
  7. Guitar
  8. Piano
  9. Mozart
  10. Barock
  11. Reggae
  12. 60sRock
  13. BluesRock
  14. HardRock
  15. HarderRock
  16. DeathMetal
  17. MelodicDeathMetal
  18. ProgressiveMetal
  19. ProgressiveRock
  20. ClassicRock
  21. ClassicMetal
  22. BeatlesTribute
  23. JungleTrain
  24. DrumAndBass);
  25. if [ $1 = "random" ]; then
  26. N=${#radios};
  27. ((N=RANDOM%N+1));
  28. radio=${radios[$N]};
  29. else
  30. IFS=$'\n';
  31. radios="${radios[*]}";
  32. source ${XDG_CONFIG_HOME:-$HOME/.config}/solarized/colors.ini;
  33. radio=$(echo $radios | ~/.scripts/dmenu-dark -p "Rock Radio ");
  34. fi
  35. radio=$radio:l;
  36. echo $radio;
  37. [ -z "$radio" ] && exit;
  38. case $radio in
  39. "random") ~/.scripts/radio random; exit;;
  40. "fuzzy") url="http://listen.radionomy.com/fuzzy-and-groovy";;
  41. "ambiance") url="http://listen.radionomy.com/ambiance-radio";;
  42. "acidjazz") url="http://listen.radionomy.com/4u-smooth-jazz";;
  43. "jazz") url="http://listen.radionomy.com/abc-jazz";;
  44. "guitar") url="http://listen.radionomy.com/acoustic-guitar";;
  45. "piano") url="http://listen.radionomy.com/piano";;
  46. "mozart") url="http://listen.radionomy.com/radio-mozart";;
  47. "barock") url="http://listen.radionomy.com/barock-music";;
  48. "reggae") url="http://listen.radionomy.com/natural-trip-reggae";;
  49. "jungletrain") url="http://stream3.jungletrain.net:8000/";;
  50. "drumandbass") url="http://dnbradio.com/aac.m3u";;
  51. *) url="http://pub5.rockradio.com:80/rr_$radio";;
  52. esac
  53. ~/.scripts/mpd-launcher;
  54. mpc clear;
  55. mpc add $url;
  56. mpc play;