SomaFM Tuner

SomaFM Tuner

spectroman
spectroman
18 views

Yes, SomaFM Rulez people!

SOMAFM

But then its quite annoying to use their interface, at least for me.

Using Linux everyday and everywhere, there are better ways to listen to them.

So I have created one "SomaFM Tuner" where I can click some buttons, change stations and automatically make it play on my Audacious.

It is a simple script using GTK Dialog. Here it is:

#!/bin/bash

# while true; do

GTKDIALOG=gtkdialog
export MAIN_DIALOG='

<window title="SOMAFM Menu" icon-name="gtk-about" resizable="true" width-request="400" height-request="300">

<vbox>
    <hbox>
    <button>
        <label>Secret Agent</label>
        <action>audacious http://somafm.com/secretagent.pls & </action>
    </button>
    <button>
        <label>Groove Salad</label>
        <action>audacious http://somafm.com/groovesalad.pls & </action>
    </button>
    <button>
        <label>Fluid HipHop</label>
        <action>audacious http://somafm.com/fluid.pls & </action>
    </button>
    </hbox>
    <hbox>
    <button>
        <label>Deep Space One</label>
        <action>audacious http://somafm.com/deepspaceone.pls & </action>
    </button>
    <button>
        <label>Drone Zone</label>
        <action>audacious http://somafm.com/dronezone.pls & </action>
    </button>
    <button>
        <label>Space Station</label>
        <action>audacious http://somafm.com/spacestation.pls & </action>
    </button>
    </hbox>
    <hbox>
    <button>
        <label>DEF CON Radio</label>
        <action>audacious http://somafm.com/defcon.pls & </action>
    </button>
    <button>
        <label>Sonic Universe</label>
        <action>audacious http://somafm.com/sonicuniverse.pls & </action>
    </button>
    <button>
        <label>Suburbs of Goa</label>
        <action>audacious http://somafm.com/suburbsofgoa.pls & </action>
    </button>
    </hbox>
    <hbox>
    <button>
        <label>Underground 80s</label>
        <action>audacious http://somafm.com/u80s.pls & </action>
    </button>
    <button>
        <label>Doomed Industrial</label>
        <action>audacious http://somafm.com/doomed.pls & </action>
    </button>
    <button>
        <label>Metal Detector</label>
        <action>audacious http://somafm.com/metal.pls & </action>
    </button>
    </hbox>
    <hbox>
    <button>
        <label>Dub Step</label>
        <action>audacious http://somafm.com/dubstep.pls & </action>
    </button>
    <button>
        <label>Ear Waves</label>
        <action>audacious http://somafm.com/earwaves.pls & </action>
    </button>
    <button>
        <label>Pop Tron</label>
        <action>audacious http://somafm.com/poptron.pls & </action>
    </button>
    </hbox>
    <hbox>
    <button>
        <label>Cliq Hop</label>
        <action>audacious http://somafm.com/cliqhop.pls & </action>
    </button>
    <button>
        <label>Beat Blender</label>
        <action>audacious http://somafm.com/beatblender.pls & </action>
    </button>
    </hbox>
<hseparator width-request="40"></hseparator>
    <hbox>
    <button>
      <input file icon="stop"></input>
      <label>Kill Audacious</label>
      <action>killall audacious</action>
      <action type="exit">Exit</action>
    </button>
          <button ok>
      <variable>OKBUTTON</variable>
    </button>
    </hbox>
</vbox>
</window>
'
$GTKDIALOG --program=MAIN_DIALOG

Just create a file somewhere in your path, make it executable (if necessary install the dependencies like GTK Dialog) en voila!