 All right, so I've been playing around with i3 blocks. You may notice that compared to my other videos, I'm using a different status bar up here. I've been looking for something a little bit more minimalist. Poly bar can be a pain at times. I mean, it looks nice. It has most of the stuff I need, but I wanted something a little more customizable, something I could add stuff to easily. And I actually started using i3 blocks again. Now, usually when you first start playing around with i3, i3 blocks is one of the first status bars you actually use. But at the time when I first got into i3, I was sort of a brainlet. I didn't know that much about how to customize my own modules. I mean, it's very simple, but I didn't know much about the Unix command line or anything like that. So I actually got back into this thing a couple of days ago and started playing around with it. And I wanna show you some of the stuff that I've made. Maybe they'll give you some ideas. So most of this, I think pretty much every module I've changed in a little bit. Some, at least one I got from online, but let me show you what I have. So first I have, on the left here, I actually, if I unpause my music, you will see this is actually, it displays what MPD is playing. Right click, unpauses it. Or you can left click on it and that'll bring up the music player. Same thing over here, like you can, so this is like a weather report. It has chance of precipitation today. It has the today's low and today's high. I'm of course in the Arizona desert. That's why it's so the low is still 71 degrees. So I can click on this as well and it'll bring up a weather report. Also I have one for my email. So I have four unread emails. I can click on that. I can click on my audio and see what kind of stuff is going on here. So most of the stuff is clickable, but of course I'm not the kind of person who's usually using any kind of mouse or something like that. But let me show you how these actually work, how I put them together. So let me bring up my i3 blocks configuration. So here we have the different modules and I'm gonna bring up in this other window all of the different, well, I guess I have a couple of different scripts that I wrote for this. So MPD, this is something I got from somewhere else. I just added in the ability to click on it. So if you don't know i3 blocks have this functionality called block instance. So you usually assign some kind of script to generate what actually appears up here. And it's actually pretty flexible what you can have. You can have, if you want colors, you can use Pango or something like that. You can have, I have a bunch of Unicode characters and they show up pretty nicely. You might need an emoji font, but you can pretty much put most whatever you want in a command and it will print it successfully. Now, in addition to that, there's the block instance ability. So basically when I click on this, it's going to, you know, what happens is it defines the block instance variable as something corresponding to how I clicked on it. So like one is left clicked, one is left click, three is right click, four and five are scroll up and down. So here, for example, you know, this script, I didn't actually write this one, but in the script, for example, when you can scroll up and down and that actually moves me forward and backward. Let me unpause this. And so if I scroll up and down, it actually moves back and forth through these songs or something like that. Now you could actually change that if you wanted it to like scroll through time in a song. That would probably be easy to change, but anyway. So that's the MPD script. So for the weather script, this is something, you know, I wanted to get weather reports. I mean, I don't want like nonstop weather reports. I don't want I3 to be constantly checking online, but I have it so it checks every 30 minutes. And you'll see over here, the interval here is in seconds. So I think that's 30 minutes, 1800 seconds. And it runs I3 weather. So let me open this up. So what this does actually, first off, this is just for clicking on it. It brings up the site. Now, if you don't know, there is a nice little site online called WTTR.IN. And a lot of people use this. You can just see URL it. But if I run this, oh, well, it's not very visible on the small terminal. I maximized my font, but it gives you basically a weather report. So, you know, you have the forecast for today, tomorrow, the day after, what it is right now, wherever you are. And it automatically detects what city you're in. You can't actually feed it another city if you want. But anyway, so my idea was basically, why don't I take this? So what I do is every 30 minutes when I run the script, first off, it checks if I actually have internet. But if I do, it will basically download this site and put it in this file weather report. And then I read two specific lines from this. Now, this is what all this is, I mean, there's a bunch of setting and awking here. But basically what this does is it takes it goes through the actually important stuff in here. Like I want to get like the daily high, I want to get the temperature on this line that is highest. And I also want the temperature on this line that's lowest. And that's what I put here. And I put nice little snowflakes for the low one and sun for the high one. Same thing with precipitation chances. Again, I'm in the desert, so they're always going to be zero. But when I move somewhere else, I'm eventually going to get some numbers here. It basically just looks for this line and checks all the zero values. And it actually returns whichever one is highest. So this is going to be your highest precipitation chance for today, which basically gives you the most risk aversion. And then you're low and you're high. So that's pretty convenient. And again, that updates every 30 minutes in my configuration. So for mail, I actually have another little script, which you could probably actually just do this with one single command if you ignore the block button device. So the block button, of course, is going to let me click on it and bring up my mail. But the actual command is pretty simple. Since I use offline IMAP and I keep all of my mail in home slash dot mail, all I have it do is actually find all the files in there that are new files in my inbox and just count them up. That's all it does. It doesn't put anything to a file or something like that. It just returns the number. I have four unread mails right now and that's all that is. So it's pretty straightforward. And the last thing, of course, is the volume. So I'll open up that, or well, not quite the last, but the volume is the same way. So I can increase or decrease it by scrolling up and down. That's what the block button is for. I can mute with a right click, relatively simple. And as I said before, if I left click, it'll bring up my audio manager. So I can play around with that in CEPA mixer. That's its name, I always forget. But anyway, so basically what this script actually does, what it returns is if Pulse Audio is mute, it returns this nice little crossed out speaker. Otherwise, it will return the actual volume with a nice little speaker in front of it and a percentage sign. So that's pretty convenient. The internet thing here, I haven't changed from the default in i3 blocks. The only other thing is the battery, which I think I, oh, I didn't actually change here. It's actually just in the, you can of course just put your scripts if it's a one liner in the i3 blocks config itself. So for this command, I really just run ACPI, which if you don't know, this is just like a battery management device and it returns whatever information you have about your battery. All I do is I just have some cutting and setting that gets rid of all the unnecessary stuff and it replaces charging with this little icon here that's like a plug, or it replaces discharging with a battery or something like that. So if I actually, let me do that. So if I unplug my computer right now, you will see in a second when it refreshes whenever it does. Yeah, so now it became a battery. So pretty straightforward. It's pretty, yeah, that's basically it. So i3 blocks, I like it because you really just have to make shell scripts to do what you need to do. I wanted before, like I wanted on Polybar to have a mail notification and also some kind of weather report. There are people who have done it, but just a lot of this stuff was really unencumbering. So it's nice to just be able to burst out and do whatever you want, like write some kind of script ad hoc to do whatever you need. And I also like that it's very compatible. As I said, you can pretty much throw icons in here. I don't think it's quite as elegant looking as Polybar or at least I don't know how to do more advanced stuff with configuring text and making it look really nice. But I think most of that's just I need a fancier font. If you have any suggestions, if you use i3 blocks, feel free to say show, say what you do or whatever, say show, whatever. But yeah, so you can check out my GitHub. I'm gonna put these little scripts up and you can play around with it, but that's about it. So I'll see you guys next time.