 Hey everybody welcome back to the channel today I'm going to be looking at a program called SXIV. Now chances are sometime during this video I'm going to mess up that name so just be be prepared for that. It's definitely going to happen. If you watch the videos I did on SXHKD chances are you'll know exactly how this video is going to go. I can't say names worth a damn and that's just the way it is. So what is SXIV? SXIV stands for simple X image viewer and it does exactly what it says it. If you run this program on an image it will let you view the image. That's basically what it does. Now it has a whole ton of options and I'm going to go through some of them so I will point this out that I'm not an expert in this program just like everything else. I'm just getting into it I've used it for a couple days and I've used it a little bit before and there's just tons of stuff that you can do and there's one of neatest things you can do is actually use it to run commands on images and I'm only just barely dipping my toes in that that ability and I'm going to show you a little bit of that too but there's so much more that you can do this beyond what I'm going to be able to show you so just keep that in mind. I will link to the arch wiki page and that has a little bit of what you can do there and also will provide you with the code that I used for the the commands that are available to you but if you're really good at bash scripting and stuff there's just tons and tons of stuff that you could do through SXIV that will allow you to manipulate your images in certain ways or whatever so let's go ahead and jump into we'll actually look at the the arch wiki page first and that's this here and I will zoom in so you can actually see it and it's not there's not a ton of information here but there's some tips and tricks and there's some explanation of the things that you can do on it and it also shows you about how to get set up on doing key bindings and stuff so like I said I will link to this in the video description and we're not going to spend a lot of time and I'm not going to sit here and just you know read it to you you can just go ahead and go read it but this is probably the best source I believe that there's a github page I might be wrong on that let's see here yeah there is it yep there's a github page I will link to this as well oops went to the wrong direction and this has a little bit more information about what you can and can't do with with it I I'm not sure if there's a wiki or not let's go up here no there's no wiki but there's a good man page which I'll show you now if we do man sxiv this is the man page and there's just tons of tons and tons of options that you can do with it I've just barely scratched the surface and some of these and I'm going to show you the the favorite mode that I enjoy using the most and that's probably where I'll focus most of my attention but if you have a problem with the you know or you want to learn more and more about the sxiv you can go through and read the man page it's definitely going to help you so let's look at sxiv let's cd into my picture solar and walls and I guess it doesn't really matter which one I do here and look let's look I think this one has cd city point I can't type and this one here has just a few images on it I don't need a lot a lot um and if we were just ran sxiv with nothing with no uh file after it nothing would basically happen but if we just want to do sxiv and then do the first the first one here I mean it lets you view the image I mean that's exactly what it's supposed to do there's nothing complicated about it it's kind of like fat in this way it allows you to view images but if we uh make this full screen there are key bindings that allow you to go through and manipulate the image so if we do uh the uh chevron i believe these are chevrons that those are actually rotate it and if we do um I think plus yeah plus plus and minus zoom in and zoom out uh w fits it to screen and then if you're zoomed in you can use the vim keys in order to move around and that is there are several other ones like I said you can view the rest of them in the man page but those are the basic things you need to know zoom in zoom out plus minus uh hjkl to move around if you're zoomed in uh w to set it to the size of the screen again and the the left and right chevrons to I think that's what they're called the little arrow things um anyways to rotate and then q to quit that's the basic functionality of sxiv now there's like I said there's tons more that you can do with it with the base even just the basic key bindings the real power of sxiv actually comes through when you because you can run commands on images actually before before I go through and show you that let me show you the thumbnail view so if I just do as you can see all these are .jpegs so if I do s sxiv dash t and then uh tell it to show me all the ones that end in .jpeg that will show me a thumbnail view of all the ones that are in that folder that end in .jpeg I believe if you had other file extensions you could just do .jpeg astris .jpeg astris .png and so on and so forth and it'll show you all of them and in this view here you can move back and forth using uh your vim keys h and h and l move side to side j and k would move up and down if there is more rows now that I'm here let me show you one of the things that I can do through using a command so if I do let's say um actually I don't like any of these images here I'm going to quit out of this and cd up a level and cd into um earth form I think I have oh yeah there's more in here so let's do a sxiv dash t and this will yeah as you can see it takes a while to uh cache these into the program if you leave and come back after it's done they're already cached I believe it saves it somewhere in the config file I'm not sure where but let's just say I'm going to show you what I could do with a command let's just find a big uh one here that I you know like it doesn't really matter let's let's do this one here I don't know if you can see the outline here um so if I do ctrl x and then ctrl w you'll see I mean you probably didn't you probably didn't notice my uh wallpaper before but you can see now my wallpaper is that and I could do it again uh let's find how about this one here ctrl x ctrl w and then it changed the wallpaper now it does not do this by default you have to go through and set it yourself so let's go back here and I'll show you how I did that let's quit this and cd back into home directory and just uh clear this out and we'll cd into dot config sx hiv slash exec now look at the arch wiki page because you actually have to create this man or um make this directory and you have to copy uh the uh standard command file or whatever to this directory or create it yourself by copying pasting the the script off from the the arch wiki page which is what I ended up doing so if I do this and you can see in here there's a script you have to remember to make it executable and we're just going to vim into key handler here and that's what this is what this is basically a while statement the one that I added was command w and then I used fe to act on the file variable which is the one that's selected and that's how I still I changed the wallpaper using xx iv um I believe you don't have to use command to do this so if I deleted just this and just made it w and wrote this and then um we'll just uh cd into pictures walls and then uh we'll just do uh sx iv yep and this here and then we'll just scroll down and find one here it doesn't really matter we'll do this one here I could do command x and then w yeah and then I can go to eight and you can see it changes so I don't have you don't have to use command as that in the second key binding you just do I keep saying command I mean control I haven't used mac in ages but for some reason command has just been out of my brain for whatever reason it's control c or control x and then control c w was what was before uh uh because I don't know where command came from control control good lord anyways and then just I've changed it to just w so you could always just use uh just you know regular letters without the modifier key which is good because that means you can also use the modifier in case you created a whole long list of key bindings you could use the letters and then modify keys and then probably if you figure could figure it out like because it's it's the same kind of syntax as um it's uh it's the same kind of syntax as you would see in a vmrc file kind of it has some weird stuff like I'm not exactly sure what on earth this extra parentheses is I've never seen that before in any bash file but I'm not an expert on bash so maybe that's just a weird shell scripting thing that's going on but normally when you have a parentheses there's they have to be open and closed this one does not these are all those closed parentheses there's no open parentheses to go along with them there's not pairs um that's really weird so basically that's xxs xiv for you now like I said there's tons and tons of more stuff that you can go through and do with it that I I've barely scratched the surface and I've done so poorly but um I really enjoy this program uh I I like it more than fab because of that ability to go through and say hey you want to I can view these in thumbnail mode uh and go through and select a wallpaper or a picture and set it as a wallpaper that's really what I want to do um I'm also going to go through a venture thing and try to somehow integrate this into ranger so I can you know go into let's see if I want to let's uh let's go back to this just do our ranger for ranger and this just shows me you know all the stuff now see my ranger whatever does not have uh image previews enabled I can't for whatever reason get them to work sometimes I take that back I got them to work on arco I cannot get them to work on manjaro I don't know what I'm doing wrong it doesn't matter what I would like to do and I'm going to do eventually is create a keybinding within ranger which will open up this this directory whatever directory I'm in in an sxiv dash t-mode so that all these would just come through and you know uh come through in a thumbnail mode and allow me to set a wallpaper that way because I have a can in here that I could set a you know a wallpaper but without being able to see I don't know which one I want to you know actually use anyways that is sxiv for you uh thanks for watching if you enjoyed this short little video give it a thumbs up if you didn't give it a thumbs down I'm sorry about the whole command versus control thing I don't know what the hell I was thinking there I'm not redoing the video to fix it it's just screw it I will put a little uh text or something in there to let everybody know that I'm a moron if you enjoy the if you'd like to support the channel you can do so uh by subscribing or uh going to patreon.com slash linuxcast or following us on twitter any of those things we really do appreciate everybody who follows and subscribes uh thank you for watching I'll see you next time