you are viewing a single comment's thread
view the rest of the comments
[–] 1 point 1 year ago* (last edited 1 year ago)

For a simple distraction-free control via Linux's command line, you can install mpg123 and add the following script files to /usr/bin/ or /usr/local/bin/:

/usr/local/bin/soma:

#! /usr/bin/bash
kill $(pgrep mpg123)
mpg123 -@ http://somafm.com/nossl/$1.pls

/usr/local/bin/somaoff:

#! /usr/bin/bash
kill $(pgrep mpg123)

Make them executable for everyone by running sudo chmod a+x /usr/local/bin/soma /usr/local/bin/somaoff.

You can now run from your console (or from KRunner on KDE, or via :sh from within helix):

# Tune into station "Lush"
soma lush 
# Turn Soma off
somaoff

Works fine from a tty as well, even with bluetooth on my OpenSUSE at least.

The specific station names to enter after soma are the ones in the URL of each station's webpage, e.g. “folkfwd” for Folk Forward, as its URL is https://somafm.com/folkfwd/.

  • source