 Are you a Linux desktop user? If you are, then you have a image viewer probably installed on your system. But is your image viewer really an image viewer? And I say that because 99% of the image viewers available on Linux do more than just display an image. Most of them have all of this extra functionality built into them that allow you to do things like set wallpaper with your image viewer or edit that image with your image viewer. But what if you just want your image viewer to display images? Well there is a really neat image viewer program out there called SXIV, which stands for the Simple X Image Viewer. So let me go to the GitHub page for SXIV and it's really kind of suckless in philosophy. SXIV is not a suckless utility, many people mistake it for being part of suckless.org. It's not, although it does seem to be kind of inspired by the suckless philosophy. To install it, well you could just install it from whatever Linux distros repositories you happen to be running. I'm running ArcoLinux, so I just install SXIV from the Arch repositories. But if you wanted to, you could just download the source code and run a simple pseudo make install, boom, it's installed on your system. And you might want to do that if you plan on editing the source code in any way because it does have a config.def.h, similar to things like dmenu and st and dwm. You could actually edit this and you'll recompile with new settings. For example, maybe you wanted to change some key bindings, but really unless you wanted to change some of the key bindings, there's not really much else to do in this config.def.h. So unless for some reason the default key bindings just aren't working for you, I'd probably just install it from your distributions repositories. So let me show you some of the basic functionality with SXIV. I'm going to CD into my wallpapers directory here, clear the screen and let me zoom in a little bit. And in this wallpapers directory, I have about 300 JPEG images. And if I wanted to open a specific one, I could type SXIV and maybe the path to a specific file like 00001.jpeg. And it will open that image inside SXIV. And by default, when that image opens up, it will fit the window. So right now it says it's zoomed in to 45% here in the status bar. This font is really small in the status bar. You guys watching the video may not be able to read that, but it fits the image to the width of the window. But you can zoom in, you can zoom out, you can make it exactly 100%. So to zoom in plus, just do the plus symbol. To zoom out, just do minus. And if you want it 100%, do the equal sign. Now if you want to flip the image, you could do the minus sign and it will flip it vertically. If you want to flip it horizontally, do the pipe symbol and it will flip it horizontally. And then let me do the minus sign to flip it back vertically. And one more time, the pipe symbol to flip it back horizontally so it's back in the right orientation. SXIV does have some mouse functionality. I could scroll with the scroll wheel in and out. If I right click on an image, I will get a thumbnail view, but we're only viewing one image right now so it doesn't make sense to be in thumbnail view. Let me actually show you guys thumbnail view on the entire directory. So if I did SXIV and then the asterisk symbol for every file in this directory. Now it loads up 00001.jpg. It actually loaded all 305 jpegs in this directory, but you have to view them one at a time. It does have mouse functionality. If I move my mouse over here, I get an arrow symbol. If I just click on the image when the arrow symbol appears, we'll go to the next image. If I move my mouse over here, eventually the arrow pointing to the left will appear, meaning I can go back to the previous images. And of course you can do this with the keyboard as well with N for next, P for previous. So if I do N, N, N, N, N, I'm going next, P, P, P, P, you know, back for previous. Thumbnail view, simply do the right click on the mouse and now you are in thumbnail mode here, which is viewing every image in this wallpaper's directory. I'm going to go back up to the top here. I believe if I just do GG, I could have went to the top. If I do capital G, it's kind of like the Vim keys. Yeah, it goes to the last GG to go the top. If I did five capital G for, you know, go to the fifth image, it is very Vim like with the commands. One thing to notice, we did get an error here in the output here. It's saying readme.md. It couldn't open it because that's a markdown file. I forgot this is my wallpapers repository on my GitLab. And there is a readme file in it, which isn't an image file. So SXIV doesn't know what to do with that. But how I would handle that is actually you can make SXIV not output to the terminal so you don't get any kind of error messages or anything like that. So you could do SXIV and then give it this flag here dash Q for quiet mode, meaning don't give me any kind of weird output in the terminal. I don't need the output in the terminal. I just want you to open up the files. Again, we'll just do the whole directory and then get back into thumbnail mode by right clicking on it. And you see now I'm not actually getting the error message about the readme.md. And one neat thing you can do with SXIV is you can actually mark a file for use in something else later, maybe in a script or something. For example, this very first file that I'm highlighting right now, if I type M on the keyboard, I just marked it. And it's very hard to see the mark. But if I move to a different file, you can see the very first one is marked. It has that little box, that white box in the bottom right. So I've marked that file for what I don't know because it won't actually do anything. You know, if I close out, especially with quiet mode on, I think if I hadn't had quiet mode on, it might have outputted something. So let me mark this file again. I'm not going to go into thumbnail mode. I'll just type M on this file and then close it. It still doesn't give me any output. But we've marked it, but we didn't tell SXIV what we're marking this file for. And what you need to do is you need to pipe this into something else for it to actually be useful. So let me do SXIV dash R for recursively dash Q for quiet mode. And we'll do every file in this directory, but we need the output. That's the O flag for output. I want you to take the output of what we do. And it's going to be, the output is going to be what we mark. So if I mark the very first file 00001.jpg, I want you to take that output and then pipe it into something else. For example, I could do XORGs and I could do, I could pass it through FEH, which is a wallpaper setter. And I want you to set that as my wallpaper in FEP using this flag dash dash BG dash skill. I hope that makes sense. FEH is just another image viewer, but it does have the ability to set wallpapers. XORGs is simply a command line utility that's saying, hey, take the output from this command. And then I want you to use that as the argument for FEH dash dash BG dash skill. I hope that makes sense. So let's run this. I'll get into thumbnail mode and I'm going to pick, I don't know, 00005.jpg here. I'm going to mark it. Then I'm going to close the SXIV window and it should take that 00005.jpg and pass it on to FEH dash dash BG dash skill. Let me go to a clean desktop and you can see that's actually what happened. It passed that along to FEH, which then set that image to my background. So that's how you would use SXIV and a script and a bash script. Maybe you wanted to put this maybe in a demon use script or something. Of course, to be honest, using XXIV and then passing it into FEH is kind of stupid because FEH is already an image viewer itself. It has the ability to set wallpapers. It has the ability to edit images. You know, FEH is kind of a bloated image viewer. That's one of the bloated image viewers that XXIV was trying not to be. So you probably wouldn't use SXIV if you already had FEH on the system. No, SXIV is simply an image viewer. So really what you would probably want to pass the XXIV output into is a program that is strictly a wallpaper setter. And there are some of these out there such as X wallpaper. So what I'm going to do is this time I'm going to pass the output from SXIV when we mark a file. We're going to take it and pipe that into XARGs, which takes the argument and applies that argument to this command X wallpaper dash dash output. And then the display for my monitor that I want to put this wallpaper on and then what kind of format, you know, zoom or stretch or whatever. I want you to stretch the image meaning, you know, fill up that particular monitor. So let's run this. And again, I'll get into thumbnail mode by right clicking. And then I'm just going to go down to one of these images. I'm going to type in on the keyboard to mark it. And then I'm going to close that window. And now I should have just changed the background to that image. And that is exactly what happened. We just passed that X wallpaper. And that's probably what most people would probably do. They would use XXIV as your image viewer X wallpaper as your wallpaper setter. You can't actually view images with X wallpaper. You can't actually set wallpapers with XXIV. You know, there are two different programs that really follow the UNIX philosophy. They do one thing and that's all they do. They do one thing and do it well where other image viewers really are more than image viewers. FEH does a million things. And that's kind of the point of today's video. People have been asking me about image viewers and about wallpaper setters. Everybody knows I use nitrogen. I just like nitrogen because it's a very simple to use wallpaper browser slash wallpaper setter. But a lot of you guys are saying that you guys want to follow more of the suckless philosophy. You want specific small little utilities that do one thing, do one thing well, that you can easily integrate into your scripts. And I think XXIV is probably the image viewer all of you guys should be using. Now before I go, I want to thank a few special people. I want to thank the producers of the show. Devon Fran, Gabe Corbinian, Mitchell, Akami, Archie, 2530, Chris, David, the other David, Donnie, Dylan, Gregory, Lewis, Paul, pick me up. Scott and Willie, they're the producers of the show. They are my highest tier patrons over on Patreon. Without these guys, this episode about XXIV would not have been possible. I've had a little bit too much coffee today. But I also want to thank each and every one of these ladies and gentlemen as well. These are all my supporters over on Patreon because without these guys, the Distro Tube channel wouldn't be possible. If you'd like to support my work, look for Distro Tube over on Patreon. All right, guys. Peace. And that's a horrible name, XXIV.