 Alacrity is an amazing terminal emulator. I've been using it for a long time now, probably close to six months. It's been my full-time terminal emulator. Now everybody knows that I had a very long love affair with Termite, and Termite is now dead, and that still makes me very, very sad. But Alacrity is a suitable replacement, and I've come to really like it. A lot of the features are just fantastic. It's really fast. I love the live updating feature, and we're going to talk about that more later. And it's just really, really good. And I don't miss Termite as much as I did when I first started using Alacrity, because I did miss Termite quite a lot. And I probably always will just a little bit. It will always hold a place in my heart. All that being said, up until the last few days, changing themes in Alacrity was kind of a pain in the butt. You'd have to change it just like you would every other terminal emulator. You'd go into the configuration file, you'd go through and put in all of your hex codes for your new theme, and then you'd be done. And while it's not a huge deal, I mean everybody has to do it, I thought that there had to be a better way. And then I came across this video here by the old tech bloke, and OTP is a wonderful channel. You should definitely check him out. And in this video here, he talks about a script that allows you to change Alacrity colors on the fly with a single command. Now, I thought that this was really cool, but it wasn't quite what I was looking for. Because what I really wanted to have done was allow me to open up Rofi and select from a list of themes, and then have Alacrity changed based on the one that I chose. And the script that this used here is written in JavaScript. And I don't know a lick of JavaScript. So I wasn't going to be able to take this script and translate it into a bash script, which is basically what Rofi would need in order for me to do what I wanted to do. So this script was a no-go, but it planted the idea in my head. So this is where the idea originated. And then today, DT posted this video here, where he went through in his configs, and he's creating a DTOS thing, and maybe someday I'll take a look at that. But everybody knows me and Xmoned don't really get along. So maybe, maybe not. But the point is, he went through and added a whole bunch of color schemes to all of his particular programs, Alacrity, Dmenu, and Xmobar. And it's really cool. He did a lot of work for that. And I can understand the work that he put into that because going through and typing in all those hex codes probably took him quite a long time. And he also had to have the knowledge in order to do certain things. So what I found was that with my idea that I got from OTB and the code and the way that DT went through and did his Alacrity config, I was able to create the script that I really wanted to create when I first saw OTB's video. And that's what we're gonna be talking about today. The long build up is going to be worth it, I promise. So let's go ahead and take a look at the script that I've created. So this is what I'm calling the AlChanger script. I'm not good at naming things. I can't help it. Basically, what this does is it takes all of the themes that DT went and put in his Alacrity config and allows you to change through them via Rofi or Dmenu. In my case, I'm using Rofi. It'd be very easy to change this over to Dmenu. If you wanted to change it to Dmenu, it would just be changing this line here to the proper Dmenu syntax instead of just using Rofi, which is what I'm doing. And like I said, this takes all the themes that DT added to his config and then allows you to choose between them. And it's a really simple script. It just declares the variable of where the config file is located. And then it goes through and declares an array and lists out all of the themes that you can choose from. And it feeds that array into Rofi through a variable called choice. And then it takes the user's choice and then does what you'd expected to do. It goes through and changes one line of the Alacrity config into what it needs to be in order to make the change to the theme that you selected, as wordy as that ended up being. It's like midnight, so forgive me if I'm not my usual eloquent self. Wait a minute, I'm not usually ever eloquent, so never mind. You're probably used to it. Anyways, the point is, this works now. Now I will have to say I had to delete one line from DT's Alacrity config in order to get this to work. So if you're using DT's Alacrity config, this will not work for you because there are basically what this does is it uses said in order to search for one particular line that has colors colon. And there were two instances of that in the config, so I had to delete one. It had to do with bold colors, I don't ever use bold in my terminal anyway, so it doesn't really matter. So I just deleted that line and this works. If you do need that line, you'd have to come up with something else in order to get this to work, I'm sure. And I'm 100% positive there's a way for said or grep or something probably to go through and search for that particular line. So I didn't have to delete one, but this was the easier way out. Everybody knows I take the easier way out. This is just the way it happened to work for me. So let's go ahead and run this thing and see if it works. So I don't have it set up on a key binding it, but I can just run the script doing dot slash L changer.sh. And as we can see, Rofi comes up and right now I'm using Dracula, so I can go down and change to Grubbox Dark. And I can run this script again and go to say Nord. And I can run the script again and go to say Solarized Light. Oh goodness gracious, that thing is really bright. And we can go down and change to tomorrow night. And then we can write one more time and go back to Dracula. And that's the script, that's literally all there is. So like I said, this is a kind of an unparticipatory team effort from several YouTubers. I got the idea from old tech bloke. I took the code from Distritube and then I put it in my own script. So that really is all there is to it. So that is the Lackard Changer script. It will be on my GitHub page, which I'll link in the video description below. My GitHub page is always linked in the video description. I have a lot of people ask me for stuff, and that link has been there for months and months, hardly anybody knows it. So I, cuz I never, you know, pimp it out, cuz whatever. Anyways, so that is it for this video. If you want to follow me on Twitter, you can do so by the Linuxcast, you can support me on Patreon at Patreon.com slash Linuxcast. Thanks to both OTB and DT for their hard work in getting me to this point, even if they didn't know that I was going to take their work and their ideas and make them my own. That's the way it works, right? So anyways, before I go, I'll take a moment to thank my current patrons. Devon, Chris, East Coast, Webb, Gentooz, Funtu, Patrick, Al, Marcus, Megalyn, Jackson, Ftoolz, D.Vay, Mitchell, Archison, and Merrick, Kent, Joshua, Lee, J-Dog, and the BSDs Rock. Thanks everybody for watching, and I'll see you next time.