 It is really amazing what you can do with a few lines of shell scripting on Linux. It's one of the things I really love about Linux as an operating system is the fact that anytime I have a problem I can usually solve it with a simple shell script. And the other day I was browsing r slash Linux and I saw a fellow, he was sharing a shell script that he wrote called Stylish. And what this is, it's a really interesting shell script that changes your wallpaper. What it does is it goes to the internet and finds a random wallpaper and then sets that as your wallpaper. It uses, I think, unsplash as the default source for sourcing the wallpapers. But it can also source various subreddits where people post wallpapers and it'll just go and grab a random wallpaper and set it for you. And I thought it was such a neat little script I wanted to highlight it today on camera. So the name of this script is Stylish. Stylish spelled S-T-Y-L-I dot S-H. Extension is the standard extension for shell scripts. And what Stylish is, it's about a hundred lines of a shell script. And it uses, I think, for dependencies, F-E-H and PyWall. Those are two command line programs people use to set wallpapers. It also uses WGIT. WGIT is what it uses to go and grab the wallpapers and download it to your machine. WGIT is a command line download utility. To install Stylish, it's just three lines of a copy and paste in the terminal. First, you get clone, this repository, then you cd into the directory. And then you simply run the Stylish shell script. And there are various flags and options that you can use with Stylish here or some examples here on the GitHub. So let me go ahead and switch over to my desktop and I'm gonna go ahead and open a terminal here and let me zoom in. And I'm gonna cd into the Stylish directory because I've already cloned the repository. And if I did an LS, you would see that we have Stylish.sh right there. That is the shell script. So if I do a period slash and then Stylish, that will run the Stylish script. And you guys probably noticed in the background that my wallpaper changed. And that was with no flags or options there. So let me move this over here. And let me run the script one more time just to verify it's changing the wallpapers. I think by default it's grabbing them from unsplash, really nice wallpapers. I mean, these are really gorgeous wallpapers if I'm being honest. So if you wanted to use something other than unsplash as the source for grabbing the wallpapers, you could use Reddit. And the way you use Reddit is, let me go back into this directory here. If I did another LS, you would see there is a file called subreddits. If I open that file, you will see by default there are five names of subreddits in that file. You could edit this file, you could add subreddits, delete subreddits. They need to be to their own separate line. By default, we have wallpapers, earth porn, spaceporn, wallpaper, and pick as the subreddits. If I wanted to specify these, I think what I could do is run the Stylish command and then give it the dash r flag and then name of a subreddit. For example, maybe I wanted wallpaper dump as the subreddit to grab a wallpaper from. It looks like we got an error for that one. Let me just do dash r wallpaper and see if it works with that particular Reddit. Yeah, and that one worked just fine. Now, there are plenty of flags and options that you can give Stylish. If you wanted to play with the scaling as far as how you draw it on the screen or what monitors you want to set it on and things like that, you do have the options of doing like Stylish dash B, space BG dash scale for scaling the wallpaper to the screen. I think some of these flags are very similar to the flags that FEH has. There's also the dash P flag. If you do dash P that uses pi wall. What that does is it goes ahead and grabs that wallpaper from unsplash or whatever subreddit. It sets the wallpaper and then it runs pi wall to give you a terminal color scheme based on the wallpaper it set. Let me see if I can actually do that. So let me switch back over to the desktop. I'm going to close the Lackardy because I don't think a Lackardy is going to work with pi wall. We need something that uses the X resources file as far as a terminal color scheme. So let's open X term. I do have X term here. And once again, let's CD into Stylish and let's run the Stylish command again. Let's go ahead and grab it from the wallpaper subreddit. So we got a new wallpaper. Now let's run that same command except this time. Let's give it a dash P flag. Wall command not found so I don't have pi wall installed. Well, you know what? Let's install pi wall. Is it pi wall? I can't remember the name in arch. Pi wall dash yet. That would work. I don't want to review the package build. Let's just go ahead and install it. This font here inside X term is a little small. I do apologize about that. It's asking for root password here to install. And now let me clear the screen here and run that last command with the dash P flag for Stylish. So it grabs us a new wallpaper and then it runs pi wall to set us a wallpaper based on this wallpaper. Wow. And that's great. So it grabbed this really pink and colorful wallpaper and then it created this really horrible terminal color scheme for us. That is rather cool. I kind of like that. And the great thing about these kinds of bash scripts and shell scripts, Python scripts, especially when they're short in length, is you can very easily go and read the script and figure out what it's doing. So what I could do is I could vim Stylish. If I could spell it correctly, Stylish. And if you know a little bit of shell scripting, you can figure out what this is doing. So link equals and then the link to unsplash to grab a random wallpaper. I think what this is, is if you don't change this variable elsewhere in the script, it's going to always grab a wallpaper from unsplash. Unless you give it a dash R flag, of course, for a subreddit, you can specify a subreddit to go grab a wallpaper from. And later on in the script, you can see some of the flags that you can do. Like we did dash P, which is pi wall here. A dash R is sub equals some kind of argument here. That's of course the subreddits. So that's what the R flag is. We also have flags B, S, H, W. I'm assuming H and W heighten width. So that is setting a size for the wallpaper. One neat thing is I notice we have the S flag for search. Let's actually try that because I actually did not think about that. So let's do Stylish dash S for search and then search for some search term, Linux. Let's find a Linux related wallpaper. I don't know what is going to go out and grab. Well, it grabbed, yeah, just a picture of some random board here, but not necessarily Linuxy, but close enough, let's run it again. See if we get something a little more Linuxy related, like some penguins or something. No, just a random picture of a location. Let's do Stylish dash S, nature. I really like that wallpaper. Wow, that is perfect. Very minimal as far as the colors, just a little bit of black and green. Actually works really nicely with my current color scheme. Yeah, so this script, again, it's a hundred lines of shell scripting, very easy to read, nothing earth-shattering as far as innovation or anything, but it's really nice. I really love it when people find a problem and solve it through the use of shell scripting. I really wanted to share it with you guys because I think I'm gonna use this. I think it's good enough. I'm gonna start using this myself. I may edit the code a little bit and play around with some things, maybe tweak it to my liking, but for now, yeah, I think this is probably the best wallpaper-setting utility I've seen, especially those of you that you stand-alone window managers and you're looking for something very easy to grab a wallpaper, what you could do in your window manager, your config, your i3 config, or openbox config, or in my case, my Xmonad config. I could actually set Stylish to run every time I log in. That way I always get a new wallpaper every time I log into my window manager, so yeah, I'm really glad I found this script. Now, before I go, I need to thank a few special people. I need to thank the producers of the show, Epsy Dallas Gabe, Lou Mitchell, Sandor Allen, Akami Archbishop, David Chuk, David the Other, David Dillon, Gregory Lewis, Oriann, Paul, Polytech Scott, Steven Smith, Wes, and Willie, these guys, they're the producers of this episode. Without these guys, this short little video about the Stylish script wouldn't have been possible. The show's also brought to you by each and every one of these ladies and gentlemen as well. All these names you're seeing on the screen right now. These are all my supporters over on Patreon because I don't have any corporate sponsors. I'm sponsored by you guys, the community. If you'd like to help me out, look for DistroTube over on Patreon. All right guys, peace.