Tips on how to structure your home directory (2023)
151–160 of 172 posts
Re: Tips on how to structure your home directory (2023)
#152I hate having a polluted home directory, especially when an application thinks it should get a non hidden directory in my home! The one that upsets me the most is the default directory for go modules `~/go`. This frustrates me so much. I refused to install any go apps or use it for development for years. I've unfortunately had to give in, and it can at least be overridden by setting `GOPATH`, but it is a terrible, te…
Same thing, wish that from the start unix had some standardized "applications put everything they want here" home directory that's separate from the "here user chooses to put their own files" home directory
Or absolutely moronic things like ~/.config/VSCod*/*Cache* -- really, cache in config?
Re: Tips on how to structure your home directory (2023)
#153Earlier quoted context omitted.
I do something similar for relevant folders, where I organize by time. I have a top level dir where I usually have what I'm working on at the moment - think "this day" or "this week". When it's time to archive it, outside that time window, I created a folder, using this format, for example for today: 041924 I move all the files I created on that day into there. As a person with a typical human lifespan, I see no need…
> 041924 I can accept YY instead of YYYY, but surely YYMMDD is preferable due to sort order.
Re: Tips on how to structure your home directory (2023)
#154For more... interesting network scenarios, it can be helpful to construct some variable, say, $HOSTABI, that includes tokens for both hardware and OS.
$ echo $HOSTABI x86_64-ubu-2204
Which can then be used inside architecture-influenced variables like ARCH, LIBRARY_PATH / LD_LIBRARY_PATH, PATH, as well as inside the user's own installation system (makefiles, etc) used for anything the user compiled. Great for just installing some new hw/sw combo, mount home, cd into "~/src" or equivalent and run "make install", and just get all your own code recompiled and installed for your new architecture.
This is a microcosm of what sysadmins on heterogeneous networks do, mostly for different hardware architectures, although this was a much more common situation in earlier years than more recently where Linux has taken over even more of the corporate/research world. I've found it pretty useful even at home, where I'm using my one home directory across my systems' different installations of Linux with different library requirements (although I should probably sell that SGI Onyx/RE - IRIX not Linux - that Wing Commander III was rendered on).
My home directory is usually populated almost exclusively with dotfiles and some threescore subdirs with 3ish-letter names like doc/ etc/ fun/ (I'm a gamer) git/ iso/ job// lib/ man/ pub/ (packages of my own programs) sbin/ src/ steam/ (yep) tmp/ var/ (notes, logs, etc) vr/ ... and so on.
It seems to work out alright. Contains about half a million subdirs and 4.2 million files. ;-)
Re: Tips on how to structure your home directory (2023)
#155Earlier quoted context omitted.
> My experience with metadata is that a lot of applications don't care about its integrity [...] This has led me to formally maintaining significant metadata in the filename, for certain kinds of files; everything else gets lost or diverges. For instance, a book file might be named `Title [a=Jim Smith; isbn=9781234567890].pdf`.
I feel like you're probably kidding, but I kind of like this. Maybe not psyched about the shell-interpreted brackets, semicolons, and spaces. But the idea is interesting!
The syntax is definitely an imperfect compromise, but most of the things I use this for have titles that frequently contain spaces (books, papers, music, etc.) so quoting would be necessary anyway, and I made myself a Python package to help with escaping and do other utility tasks like normalizing ISBNs.
Re: Tips on how to structure your home directory (2023)
#156Programs can pollute it all they want, since I don't use it myself I also don't have to care about that.
Re: Tips on how to structure your home directory (2023)
#157I have projects folders for each category of project, and each project gets a folder. Anything programming related, gets a git repo.
I used to have my top level folders by category, documents, code, etc, and that was a miserable idea. I much prefer sorting by project.
Any folder can have an "Archive" dir for old stuff.
I also have a Collected folder, for stuff that's I just found online and saved, sorted by category. Stuff like RasPi os images and sound fonts go there. It's like downloads but less ephemeral.
Then I have the one that people might not like... TheRuins. Whenever I do a clean reinstall of an OS, which used to be every few years, my old home dir would go there.
I don't want to just use a new home dir, because for one thing it's probably 95% stuff I don't actually need, and also it might have files for some old version of some app that might break the new one.
Stuff I actually DO want, I can manually move along into my new home dir out of the old Ruins.
The rest can just stay until I eventually need more space and move it into an SSD.
All of my media files live in a folder synced with SyncThing, as do a lot of other things.
Stuff I really want to keep gets replicated to my phone and tablet, as well as actually being backed up.
Finally everything gets backed up with Vorta. It's deduplication is amazing when you often move stuff around in a Ruins folder.
If I had the budget, I'd probably have a NAS with two disks, one as a backup target, and the other for general storage.
Re: Tips on how to structure your home directory (2023)
#158Earlier quoted context omitted.
That's only two applications to configure though.
The `~` path (and `cd` with no arguments, to get there) are also part of the prime real estate. It's as if these polluters think you'll enjoy accessing their stuff via `~/ ` which might or might not be true.
Re: Tips on how to structure your home directory (2023)
#159I remember I deleted a built-in directory like "Documents", and it lost its custom document icon, even when I created a "Documents" directory anew. No amount of googling / asking forums and IRC could bring my custom icon back. :) (Linux Mint, Cinnamon)
https://man.archlinux.org/man/user-dirs.dirs.5.en If you delete one folder the file $HOME/.config/user-dirs.dirs will be updated sooner or later, and point to $HOME/ and the icon will not be restored by recreating any folder. Just change the values in there to whatever.
Re: Tips on how to structure your home directory (2023)
#160Earlier quoted context omitted.
I can’t tell if this is sarcasm or not. $HOME is the one directory which belongs to the user. In some cases, it might even be encrypted with a user-owned key. I can’t imagine being comfortable putting my files anywhere _outside_ of the home directory. That feels like going back to the DOS / Win3.x days where hard drives were the wild west.
I follow the above advice. My personal stuff is in $HOME/$MY_FIRSTNAME. I can organize this directory any way I want to, e.g. by project, time, purpose, whatever. It’s my stuff. The stuff in $HOME is then more “the computer’s stuff.” (E.g., on MacOS, Photos, Desktop, Downloads - that’s where the computer dumps that stuff.) The other place is where I put things. This turns out to work quite well. It allows me to be un…