 Okay, so this here is Ranger, the file browser, the file manager. And if any of you guys aren't using this, you should be. And if any of you guys are using this, you should use it even more. This is one of the single best programs I have, like most useful in terms of optimizing my workflow. And I recommend it to anyone, whether you're using a GUI file manager like Thunar, Nemo, or whatever, or if you do everything in shell. So there are some videos already on YouTube about the basics of this, but I wanted to go into how my config works for Ranger, because it's so incredibly customizable. So if you want to go to your config, once you've installed Ranger in whatever distro you have, the config should be in home slash .config slash ranger.rc.conf, and you can open that up. If you don't have that, you just run ranger-copy-config, and that will copy the defaults to this position. But once you have this, you can go ahead and open it up, and it has a bunch of settings in there by default. I've sort of cleaned mine up. So you have settings at the beginning, then you have sort of the key bindings. And the nice thing about this program just at the very beginning is you can basically rebind any key really easily. So that's nice. But I want to show you sort of my optimizations, like how I deal with my workflow, how I organize files. And I do that by having a whole bunch of different commands for all the folders I regularly use. So here, we got my documents folder, article folder, LaTeX folder, got my classes, got some general, got my wallpaper. Every folder that I'm going to be using, even irregularly, is in here. And what all this is, is a bunch of mappings that map particular key presses to do different file operations in different folders. And I really have four major operations, if you look here. So let's say my documents folder, I abbreviate that as D. So GD means go to documents. So if I'm in here, I just press GD, now I'm in documents. Or let's say I press TD, TD is make a tab in documents. So now we have a tab in documents, that's tab number two, you can press tab to go back and forth between them. I also have other things like MD, MD means move any selected file that I have two documents. So let's say for example, well I don't know, we'll move, actually we'll go to my downloads folder. So I have this picture here, I can just press MD, now it's in my documents folder. And I can go look at it, here it is. Very easy, let me move that back to the downloads. Actually I'll, so for any of, for all of the major folders I have, I have a go, a go command, a tab command, a move command, oh and the other one is capital Y, that's yank or copy. That's just make a copy of this file in another folder. I use that less often, but whatever. So these commands just make everything so easy. So here, actually here is my downloads folder, I have a couple files here. So I can select these two which seem to be landscape folders, and I can just say move W for wallpapers and then L for landscapes. That's how I have the keyboard shortcut worked out. So I can really just sort files immediately in my downloads folder, so that makes things easy. And I can reorganize pretty easily. It just makes my life a whole lot better. So you can coin all of these different shortcuts ad nauseam, and that's exactly what I've done. It might look like a lot here and it sort of is, but that's just because if you're using Vim or Emacs it's a lot easier to modify all of these at once. And specifically what these do is the go and tab commands, use a ranger specific console command CD and tab new, and for the move and yank commands I actually have it call a shell script which moves what this means the percent percent s is all selected files. And then this is just shell script here. So that's how that works. That's one thing that, I mean that is like 90% of the optimization right there. This is like a total life saver if you have a really complex folder structure like I do with a whole bunch of everything. But you can also do a bunch of little things that just help with life. So I have a bunch of little shortcuts tagged to different shell scripts usually. So for example I have music tagging, Taffy is this program I use. It's a command line music tagger and I have console commands that will allow me to call it like change artist title or album or whatever. I also have things like SS is bound to send to my server. So let's say I want this file on my server. I just press SS and it runs an rsync command that just asks for my password. I put it in. I'm not going to do it here. But I put it in and it sends it to my web server if I want to use that. Again, just at the press of a button. I run an extract script for extracting files, YouTube DL scripts that's not as important. One of the big things that I actually I really like is I have this background sort of wallpaper command. So let's say I'm, let's go to my wallpapers, I'm going to landscapes. Let's say I'm in my landscape folder and there's, let's say I really like this background. I can just press BG and that becomes my background really easy. And what this command does is it runs a shell script that first copies the file to a config slash wall dot PNG. And that is the place I have I3 always looking for the background file. So if I restart I3, you know, that's going to be the wallpaper. And also I have fast set it immediately as the background. So that's how I do that. So I can pretty much just change, oh, let's say I want this one now. So now it's my background, super easy. I also have like sort of image modification commands. So let's say, let me go to my pictures, go to a picture of me, yeah, this one's less symmetrical. Let's say I want to flip a picture vertically. Let's say I want myself to be sort of facing the other way. If I just, I've mapped F to an image magic command. It just converts it and flops it to the other side. Let me show you what that looks like. Ranger doesn't update its preview, but I've already pressed it. And here's what it looks like. Once I, if I restart Ranger, you'll see the preview. I haven't figured out how to get it to update immediately. But it does everything you need just at a key press. Let me flip that backwards, actually. OK, good. So just a little stuff like that. I have, if I want to modify config files, I have them all set on, here's my VMRC. I have them all set to like shortcuts in Ranger, just in case. And stuff for modifying LaTeX, making LaTeX templates or whatever. And one of the other things sort of related to that is, Ranger's nice because you can set what kind of files you want it to ignore. So you can set the hidden filter to, you just give it a regular expression. And you can say, let's say I never want to have, I never want to see a log file. Well, you can just put log in here. And you won't see log files unless you specifically tell it. If you press, what is it, ZH? Yeah, it shows you hidden files. Yeah, so anyway, that's the main configuration file. But there are also other things you can do. So for example, in rifle.config or conf, whatever. This is the file where you put in what you want Ranger to do when you select something. So what your default browser, what your default image viewer is, all that stuff like this. So you can just sort of optimize this how you want. You can go in here and figure out the syntax. I've only made a couple modifications here, but it's nice to have different things. So for example, here's a GIF. And it's not animated in Ranger. I haven't figured out how to get GIFs to animate in Ranger. I don't know if it's possible. But I've just told it whenever you have a GIF and I open it, just actually let me find where I wrote that. Oh yeah, here, it's right there. I just tell it, oh, open it in MPV on loop. So if I open this file, this is an MPV and it's just looping itself. So you have a lot of freedom in what specifically Ranger is doing whenever you're opening a file or anything like that. So yeah, that's generally what my setup looks like. Again, the main good of it comes from all these movement commands, which you have no idea how much time I saved just by doing them. And so this is my setup. I might do another video later that gets sort of into the Python code, which you can pretty easily modify, but I haven't necessarily done it that much myself. But yeah, anyway, thanks for watching. Hope you enjoyed it.