• Vehicles • Fashion • Recipes • Blogs • Hunt • Travels • Sport • Fun • Handmade • IT • Education
Mini-Games
x

x
zakruti.com » IT - Software » IT, programs, coding
Bash Script For Listening To Online Radio DistroTube

Bash Script For Listening To Online Radio DistroTube

FBTwitterReddit

video description

Rating: 4.0; Vote: 1
Bash Script For Listening To Online Radio DistroTube Every few weeks, it seems like I suddenly get the urge to do some bash scripting. And today was one of those days. I was at the office and wanted to listen to some online radio, and I thought: what I need is to create a dmenu script for this! NOTE: Since making this video, I have reworked this script so it looks a bit different now. Here is the version of the script as seen on this video: - https://gitlab.com/dwt1/dmscripts/-/blob/23ec5dbec96735bcce5d15d84e387d61b27461b6/scripts/dm-radio - dm-radio (version seen on video) - https://gitlab.com/dwt1/dmscripts/-/blob/master/scripts/dm-radio - dm-radio (current version) - https://gitlab.com/dwt1/dmscripts - dmscripts
Date: 2022-03-30

Comments and reviews: 10


Typically, I like to do these -quick and dirty- scripts just to show you guys how to solve a problem. Obviously, the code can be improved and/or cleaned up a bit. You guys had a lot of good suggestions! I took some of the advice given and have made some changes. The radio station list is now an associative array in the dmscripts config file (a file that gets sourced for all the dmscripts). I swapped out 'dunstify' for 'notify-send' for better compatibility. And the case statement now only includes two options.
reply

-I wasn't planning on making a video, I did some administrative work, and I wanted to listen to some online radio. And I thought, hey man look at me rocking out, I'm on my RADIOOO! Would'n it be great if I had a DMenu script that's on my VIDEOOOO! With Danny and Lisa-a. They take me away from, the strangest places. With Danny and Lisa, aAaAa, tum tum tum, pa, pa tara ta tara ta tum-
reply

Your adopted son over at - The Linux Cast- did a video on a project on Gitlab called Rofi-Beats that does the same thing but uses Rofi. You did add some improvements and use Dmenu and that said, there both awesome.
Thanks DT for all the hard work! Yes finding radio stations you like and work is a bit of a pain! LOL
LLAP

reply

Nice little script Derek. Maybe put the radio selection information in a text file for greater flexibility. Re-create an array based on this file each time you change stations so new entries get picked up quickly without any program changes. Thanks for the idea! I'll probably write one for myself.
reply

Sorry to miss the subject, but I need to ask anyway.
I manage to make work before, but in my new installation of Artix witch DWM, I wasn't able to make japanese chars to appear properly on DWM / ST, does someone have a definitive solution?

reply

i love scripts like this one, but there is so much copypasta ...one has to understand whole script to add new option. You should try compress -name- => -url- to a simpler form, like arrays
reply

Nice! You got a lot of code duplication in there, though. I think it would be easier to maintain if you just put all those stations in an array and made the actual code use that.
reply

Hey! DT, instead of using dunst/dunstify, you should use libnotify package and notify-send command instead. notify-send should work on every DE without installing dunst.
reply

Dmenu is so useful and modular, btw shot out to rofi. Similar to dmenu but looks more nicer. Specially with a polybar theme that uses it with a special theme.
reply

Would have liked to hear what is critical about the URL for it to work with MPV. By chance is it the stream url wrapped in a meta tag inside the page header?
reply
Add a review, comment






Other channel videos