Skip to content

Instantly share code, notes, and snippets.

@mnlwldr
Created October 25, 2022 21:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mnlwldr/91cd0b0586abf405fa8aa0fa71aa6f1d to your computer and use it in GitHub Desktop.
Save mnlwldr/91cd0b0586abf405fa8aa0fa71aa6f1d to your computer and use it in GitHub Desktop.
bash aliases for playing somafm stations
_somafm() {
mpv $1 2> /dev/null | awk '/title/ { s = ""; for (i = 2; i <= NF; i++) s = s $i " "; cmd="(date +'%H:%M:%S')"; cmd | getline d; print d,"|",s; close(cmd) }'
}
alias groovesalad='_somafm "http://ice1.somafm.com/groovesalad-128-aac"'
alias defcon='_somafm "http://ice1.somafm.com/defcon-128-aac"'
alias deepspaceone='_somafm "http://ice1.somafm.com/deepspaceone-128-aac"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment