dmenu_soma

Submitted scripts and programs
Forum rules
Your own work only.
User avatar
ChefIronBelly
Approved BBQer
Posts: 1044
Joined: Mon Jan 13, 2014 6:01 am
Location: Michigan

dmenu_soma

Unread post by ChefIronBelly » Thu Feb 04, 2016 5:46 pm

I kind of have been wanting somethng like this and after seeing bacons dmenu_hset.

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
List of stations came from pidsleys tinyradio.

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
.dmenurc

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
.osdrc

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
edit: updated based on bacons link below.
Last edited by ChefIronBelly on Sat Feb 06, 2016 6:51 pm, edited 2 times in total.
(1/1) Installing: LinuxBBQ...................................[69%]==============[/]

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: dmenu_soma

Unread post by machinebacon » Thu Feb 04, 2016 6:12 pm

If you take this one it also has a play/stop-toggle:
http://www.linuxbbq.org/bbs/viewtopic.php?f=15&t=2474
..gnutella..

User avatar
ChefIronBelly
Approved BBQer
Posts: 1044
Joined: Mon Jan 13, 2014 6:01 am
Location: Michigan

Re: dmenu_soma

Unread post by ChefIronBelly » Thu Feb 04, 2016 6:23 pm

Very nice missed that one.

Edit updated using now :)
(1/1) Installing: LinuxBBQ...................................[69%]==============[/]

Post Reply