See bacons link below.
dmenu_soma.sh
Code: Select all
#!/bin/sh
# play somaFM radio streams using dmenu and mpg123.
. $HOME/.dmenurc
. $HOME/.osdrc
selection="";
if [ "$(pidof mpg123)" ] ; then
echo "All your sound belong to us ..." | osd_cat $OSD_s $OSD_S $OSD_p $OSD_a $OSD_d $OSD_l $OSD_CL $OSD_FN
killall mpg123
exit 0
fi
stations="$(cat /home/chef/bin/stations)"
selection="$(echo "$stations" | dmenu "$@" $DMENU_FN $DMENU_NB $DMENU_NF $DMENU_SF $DMENU_SB)"
player() { mpg123 -C -@ "$@" 2>/dev/null & }
if [ "$selection" ]; then
echo "Playing SomaFM channel $selection ..." | osd_cat $OSD_s $OSD_S $OSD_p $OSD_a $OSD_d $OSD_l $OSD_CL $OSD_FN &
player http://somafm.com/$selection.pls
else exit;
fi
stations
Code: Select all
groovesalad
lush
earwaves
deepspaceone
spacestation
missioncontrol
dronezone
poptron
events
dubstep
indiepop
folkfwd
bagel
digitalis
sonicuniverse
secretagent
illstreet
thetrip
cliqhop
covers
u80s
beatblender
doomed
Code: Select all
#!/bin/bash
# ~/.dmenurc
DMENU_FN="-fn -*-terminus-medium-r-normal-*-18-*-*-*-*-*-*-*"
DMENU_NB="-nb #506070"
DMENU_NF="-nf #dedede"
DMENU_SB="-sb #dedede"
DMENU_SF="-sf #2d2d2d"
export DMENU_FN DMENU_NB DMENU_NF DMENU_SF DMENU_SB
Code: Select all
#!/bin/bash
# ~/.osdrc
OSD_FN="-f -*-terminus-medium-r-normal-*-18-*-*-*-*-*-*-*"
OSD_CL="-c #dedede"
OSD_s="-s 0"
OSD_S="-S #dedede"
OSD_p="-p top"
OSD_a="-A center"
OSD_d="-d 5"
OSD_l="-l 1"
export OSD_s OSD_S OSD_p OSD_a OSD_d OSD_l OSD_CL OSD_FN