 Recently, I published a video on my channel about the Radioactive Player, which is a radio player for the terminal. And a lot of you guys were really excited about that particular program. I know a lot of you guys have a terminal-based workflow, and you found that particular program very useful. But I did have some comments on that video from more than one person about, is there a radio player available to install inside of Emacs? Because a lot of you guys have a more Emacs-centric workflow. And actually, Emacs does have several radio players available for you that you can install. One of the most popular ones that I've actually played with a little bit in the past is a program called E-Radio. And today I'm going to show you how to install E-Radio inside Emacs. It's dead simple to get this thing set up. If I switch over to my web browser here, you can see the source code for E-Radio can be found on GitHub. It is licensed under the GPL version 3. And if you read a little bit of the read me, there's really not much to this program. There's only three commands for it. You have a play button, a stop button, and a toggle button. And other than that, you have three variables that you can assign if you want to deviate away from the default values for these. And then you have how to install it. So you have a method to install it for Doom Emacs, for those of you using Doom Emacs. Or you have the standard use package way of installing E-Radio. And that's what I'm going to use today. By default, what E-Radio does is it uses VLC as its back end to play these internet radio stations. Now, you don't have to necessarily use VLC as the back end. If you wanted to switch to another multimedia player, you can. For example, MPV is an option. And I'm actually going to use MPV as my back end for E-Radio. Even though I have both MPV and VLC installed, I have noticed VLC. And you have that set to the player. It is kind of limited because certain internet radio URLs, certain streams, VLC has a problem with where MPV tends to play pretty much everything that you throw at it. So let me go ahead and pull up my Emacs config here. So let me do a Space FC, which is a key binding I have set for my Emacs config. And let me zoom way in. And I've already created a section in my config for E-Radio. So let me click on that. And E-Radio, I've got a heading here and a little bit of information about exactly what E-Radio is. Because I'm writing my Emacs config in org, you know, this is a literate config. So this is just comments. This is not actual code if I zoom out a little bit so you can actually see the code. The only code I need to add to my config is this here. And 95% of the code is just a list of the internet radio stations that I wanted E-Radio to know about. Essentially, to install it, let me zoom back in. You just do a simple use package E-Radio. That's really all you need to do unless you need to do some configuration options, use package E-Radio. And then for me, I also did colon and yet. So this is some variables that I want to assign before E-Radio starts playing or is initialized. And the very first thing I wanted to do is swap away VLC as the back end. I don't want to use VLC as the back end. I want to use MPV as the back end. So this is the string that they recommend for setting MPV as the E-Radio player. So that is the name of the variable there. And if you're wondering what the E-Radio player variable is assigned to you out of the box, you can always do meta X and do describe variable. For me, I have a key binding for describe variable. I have space HV for help variable from describe variable. And if I do a search for E-Radio player and hit enter, I get the split here. This says the value is set to MPV, no video, no terminal. So that's what it's currently set to because that's what I have in my config. But it tells me the original value. So if I ever want to go back to VLC as the player, here is the original value that I would need to go and set that back to. So I'm going to go ahead and close that split. Then the only thing else in the use package block here is colon config. So these are configuration options. I do a set queue on E-Radio channels. So this is a variable. But essentially it takes a list of URLs, let me zoom out so you can see this a little better. It is a list of internet radio URLs. And the format is the title of the radio station and then period and then the URL of the radio station. Let me zoom back out a little bit more. Some of these URLs are kind of long. So that is essentially all you need to do. Once you have that, you are ready to just do a meta X and then E-Radio. And again, you only have three E-Radio commands. You have play, stop, and toggle. Now for me, I would like to have those key-binded. So also what I did, let me go to my general key-bindings section here. I went ahead and created a new section of my key-bindings beginning with R for radio. Instead of using E for E-Radio, because I already had a whole bunch of E key-bindings if I scroll back up, I was using space E key-bindings for E shell key-bindings, E value eight key-bindings, as well as E-W-W-bindings. So there's a lot of E things in Emacs, right? So I was getting kind of crowded with my E key-binding. So I went ahead and created space R key-bindings for radio because I wasn't using space R for anything. And you can see what I've decided to go with is space RP for radio play, RS for radio stop, RT for radio toggle. So if I do a space RP for play, I get the mini buffer here and then I get a list of the channels that I specified in the config. You know, this is all the radio stations that I added. This is the titles. That's why you had to add a title. If I wanted, for example, to listen to totally 80s FM, this is going to be copyrighted music. I got to be careful here, but I could hit enter on that. And it's going to start playing in just a second. The king asks, what's that sound? Well, actually, it's an ad space RS to stop. So thankfully, it was actually an advertisement and not music. But you can see that's how that works. And if you don't want to do a play and stop, then you can always do the toggle key-bindings. For example, space RT to toggle will start that station that I was just on. It will start playing again. Space RT will toggle it back off. So it's a very, very simple program. E radio, not much to it. Again, you really, unless you need to change the back end to MPV, which I actually recommend you probably do. That's probably the only real setting you need. And then, of course, you need a list of Internet radio stations. If you want to get a good list of Internet radio stations, just kind of a general mix of radio stations, what I did, I actually already had this list available because I maintain my DM scripts program. I do a vertical split here. And in the split, let me go navigate to DM scripts on my system. So in the DM scripts repository, let me get a list of all the DM scripts. I have DM radio and DM radio takes a list of radio stations, but I don't have the radio stations in the script itself. I actually have that in the DM scripts config. I go to the DM scripts config, the default config somewhere has a list of radio stations, right? So this is a bash script. All I did is I formatted this in a way so I could put that in my eMax config because it already contained title of the station as well as the URL of the station. This is a bash array. So I just did a quick copy and paste of that over here and then cleaned it up so it was proper eMax list for this use package block. So there you have it, eRadio, pretty simple. For those of you that want to get my eMax config, maybe you want to take a look at that eRadio block, or maybe you just want to take a look at everything I'm doing with my eMax config. Go to my GitLab at gitlab.com slash dwt1, dwt1. That's my GitLab. Go to my .files repository and in .files go to .config slash eMax. And then config.org. And this is my eMax config and you have eRadio, that particular section there. The links do not work in GitLab, though, for org documents. So you have to scroll down to the eRadio section. And there you have the appropriate code. Now, before I go, I need to thank a few special people. I need to thank the producers of this episode. And of course, I'm talking about Gabe James, Matt Paul, Wes, Armor Dragon commander, Ingrid George Lee, Methos, Nate Urion, Paul P. Sartron, Fedora, Reality's for Let's Red Prophet, Roland Solas, Street Tools, Devler, Wargent 2 and Ubuntu and Willie. These guys, they're my hot steered patrons over on Patreon. Without these guys, this episode about eRadio and eMax would not have been possible. The show is also brought to you by each and every one of these fine ladies and gentlemen. All these names you're seeing on the screen right now. These are all my supporters over on Patreon. I don't have any corporate sponsors. I'm sponsored by you guys. If you like my work, want to see more videos about free and open source software like eMax. Subscribe to DistroTube over on Patreon. These guys. Why do I run Linux when I can just run eMax?