 One of my biggest pet peeves is when a developer puts a directory or a file in your home directory without permission or without at least enabling you the option to move it elsewhere. It absolutely drives me nuts because I want my home directory to be 100% mine. I want it to be the place where I am in control of everything that's in there. And unfortunately that's just not the case because a lot of applications that she install you just can't move those directories when they're placed there because the application is looking for them and if you move it the application breaks or just creates it again and you're just kind of stuck with the way things are. But there are actually some things you can move out of your home directory but figuring out what you can move and what you can't move has always been very hit or miss. It really depends on how much you do your research and whether or not you want to actually put in the work to move the things that can be moved. And while I wish there was a tool that would allow you to just run a script or something that would then move everything that can be moved that script doesn't really exist. However, there is a script called XDGNinja that was just created a little while ago that will at least tell you the things that can be moved and most importantly how to move them. So while it's not automatic, it is something that will at least tell you the things that can be moved. Now it's actually really easy to run the script. So I'm going to do that today and show you what this script is all about. So let's go ahead and jump in. So first I'll show you the GitHub page. This is called XDGNinja and it's just a simple shell script that relies a little bit on JQ. But other than that it just runs in your normal everyday terminal and there aren't a ton of dependencies or anything like that. I think the only dependencies are that you're running a shell of some kind that's POSIX compliant and that you have JQ installed. That's really all that it requires. It does have a couple optional dependencies like glow for rendering markdown or cabal, but you really don't need those. I only have the first two installed and it works just fine. So if you want to install the script, all you have to do is copy this URL here, use get to clone it into a directory and CD into that directory. And I've already done that. So I'm going to move over to a terminal here. And I'm in that directory that I cloned from that GitHub page called XDGNinja. As you can see right here. And if we do an ls here, you'll see that there's not a lot to it. So if we want to run this, all we have to do is dot slash XDGNinja.sh. And it's going to run this. It's going to take not very long, maybe a minute or so. It will scan your home directory and show you things that can be moved. And then it will also tell you how you can move those things. So there's not a lot to this application, but it's really cool because as you can see, there are several things in my home directory that I can move. So for example, I can move the .fab.bg file, which is what sets my wallpaper. You can just have the call out for fe or fair or whatever it's called. Use this flag and it would no longer put that in your home directory. The .git config thing can be moved right to .config or inside of a .git directory inside of .config. So that would be easy to move as well. And it just goes on through everything that it found in my home directory that can be moved. There are obviously some things that can't be moved. So like .ssh that has to stay there, .steam, PID that has to stay there because steam is proprietary. So you can't move it. It's just going to always look for that stuff there. Same thing with .steam. So for every directory or file that it scans in your home directory, it gives you the options you have for moving that thing. Now, like I said, it doesn't do it for you. When I first saw this, I was like, oh, this is going to be great. I'm going to run this script and it's going to move everything that needs to be moved for me. But I can understand why that would be hard because some of these can only be moved if you set environment variables or need to be moved in places that require root access, stuff like that. And that can get kind of dicey. Like you don't want a script to be messing with things that require root directory access because, you know, you don't really know if it's doing anything nefarious or not. So it's better that it doesn't do it for you. And you have to go one by one to kind of move these things for you. So I understand why that's so. So that's really all there is to XdgNinja. You run this, you can go through one by one and move these things where it's appropriate to move them if it's possible. And you're done. You'll have a much cleaner home directory than you did before. If you can move every single one of these things that can be moved. Now, one thing that I should just cover briefly is that if you run it into something like this, where you have to export a environment variable, you can do that in any number of places. It really depends on what shell you're running. So if you're running bash, you can export variables in your dot bash profile directory. I believe you can also do it in dot profile. I'm not actually sure about that. I would highly recommend looking up the places where you can declare environment variables because it really does depend on what shell you're running. For me, I'm running zsh. So mine is in a file called dot zshn. So if I do dot zsh env hit enter, you can see I have several environment variables here. And some of these are actually have been declared because I wanted to move things. So for example, the go path, I've changed it so that because when you downloads an application that is written and go, it creates a directory inside your home directory called go. It's kind of like snapped in that way. And you want to move that you have to declare this environment variable. And that's how you do that. This is the zsh version. Bash does something almost exactly the same syntax is the same. It's just a different file. And you can, I'm not sure what you do with fish. I've never used fish. So fish does something a little bit different. There's also other places that you can declare environment variables. If you want to, you just have to look that up. So that's probably the most technical part of any of that stuff that you would have to do with XdgNinja is declaring environment variable because like I said, that is going to really be highly dependent on what shell you're running because they're all done in different places. Other than that, the syntax is basically the same. So that is it for this video. I find this tool really quite good because there definitely were some things in my home directory that I didn't know I could move that I'm happy to find out that I can because I always strive to clean up my home directory as much as possible. Like I said, I'm not always good at it. I want to be good at it, but it is something that I'll have to strive for more and this tool makes that a little bit easier. So I'll put the link to the script in the video description. If you have comments, you can leave those in the comment section below. If you want to follow me on Twitter, you can do so at the Linux cast. You can follow me on Macedon and all of my other social media networks. And those links will be in the video description below. You can support me on Patreon at patreon.com slash Linux cast. I'd like to thank my current patrons, Robert Sid, Devon, Patrick, Fred, Kramer, Tridevil, Antoine, Uncle Bonad, KB, Gryff's Lounge, Megalyn, Jackson, I'm Jules, Steve, Isabella, makes Derek, Samo, TGB, Keith, Andy, Gary, Ross, Mitchell, J-Doug, Carbone, Dader, Jeremy, Sean, Oden, Marni, Eduardo, Artsner, Elliott, Mizzle help, Merrick, Camp Drashley, Peter, a Crucible Dark, 26 Prime, Kim, Arlox1, and Phillip. Thanks everybody for watching. I'll see you next time.