Tips on how to structure your home directory (2023)
81–90 of 172 posts
Re: Tips on how to structure your home directory (2023)
#82Re: Tips on how to structure your home directory (2023)
#83Re: Tips on how to structure your home directory (2023)
#84I actually have quite a simple structure that serves me well (your mileage might vary) projects/ 2023/ 2024/ 0000-something/ 0312-other-project/ 0419-hn-comment/ each year I make a year folder. And each project has a month + day prefix. Sometimes I want long term projects to pop up on top, so I prefix them with 0000 (or only make the day 00). It is simple, works on any OS. Although on Linux I do have some helper scri…
Re: Tips on how to structure your home directory (2023)
#85[0] https://writings.stephenwolfram.com/2019/02/seeking-the-prod... [1] https://news.ycombinator.com/item?id=26045380
Re: Tips on how to structure your home directory (2023)
#86anyway here's my idiosyncratic setup, would probably be terrible for anyone else:
everything goes in Dropbox (paid 2TB account)
my Dropbox subfolders are organized by broad filetype, e.g.
~/Dropbox/{Code,Documents,Videos,Downloads}
on a new computer I install Dropbox and create symlinks, e.g. /home/rml/.emacs -> /home/rml/Dropbox/Code/personal/config/dot-emacs
/home/rml/.Xinitrc -> /home/rml/Dropbox/Code/personal/config/Xinitrc
/home/rml/Code -> /home/rml/Dropbox/Code
... etc
Because I pretty much live in Emacs and manage files using `dired` I have lots of Elisp code and custom keybindings that take me to my most-used files and directories. For other "tier 2" things I either know where they are due to long habit (most stuff doesn't move or it's obvious which folder e.g. a PDF will be in) or I use a combination of `M-x locate` and `M-x grep` which works pretty well.Re: concerns about "where apps store stuff" I mostly don't care because everything I care about is in Dropbox. If it's something I use a lot, its config is symlinked in wherever the app expects it to be - otherwise everything is a few `dired` commands away.
(On macOS `M-x locate` can be configured to use the builtin `mdfind` which works very well for finding things IME. I think it's what drives Spotlight.)
At some point I may set up 'recoll' and all that but so far I haven't needed it so I haven't paid the complexity tax of trying to configure that across Windows/macOS/Linux vs. good old locate/grep
FWIW because I limit myself to a "standard" set of apps (Emacs, browser, VLC, PDF/image viewer) the above setup works pretty much the same across Windows/macOS/Linux, so most of the time I don't have to care that much which system I'm typing into
Re: Tips on how to structure your home directory (2023)
#87I 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…
The worst offenders are CLI tools written by people on Macs that do not respect XDG, because it's not a thing over there. So every tool gets to pollute your dotfiles with its own stupid directory. .rustup, .mix, .npm, .yarn, etc. But polluting your home directory like ~/go, without even the decency to hide it, is extremely rude and offensive.
I don't really ever program in golang, but whenever I write a Node.JS/Python tool that does need a user-global config file, I just write my own implementation of it:
function userConfigDir() {
switch (process.platform) {
case 'darwin':
return `${os.homedir()}/Library/Application Support`;
case 'win32':
if (process.env['APPDATA']) {
return process.env['APPDATA'];
} else {
throw new Error('%APPDATA% is not set correctly');
}
case 'aix':
case 'freebsd':
case 'openbsd':
case 'sunos':
case 'linux':
return process.env['XDG_CONFIG_HOME'] || `${os.homedir()}/.config`;
default:
throw new Error(`The platform ${process.platform} is currently unsupported.`);
}
}
[1]: https://pkg.go.dev/os#UserConfigDirRe: Tips on how to structure your home directory (2023)
#88> Originally, when I stopped using Windows back in about 1998, I was used to using spaces between words in filenames and directories. As I progressed into the world of Linux and BSD, I changed all spaces to underscores, but since I have done (and still do) a lot of web development I eventually settled on hyphens. I not only think it looks better, but the fact is that search engines interpret hyphens in file and directory names as spaces between words. Underscores are usually not recognized, and as such, their presence can negatively affect search engine optimization. Even though files in my home directory are my private files and not something I put out on the web, I have just settled on using hyphens everywhere.
I couldn't agree more. It's so practice to use hyphens when navigating on terminal that i think it should be a standard. It's even better than pressing every time to select an underscored filename or for spaces. Duh
Re: Tips on how to structure your home directory (2023)
#893dp -> 3d printing files
archive -> manuals, papers, website backups, etc
audio -> music and sound files
bin -> scripts and hand-installed binaries
build -> other peoples' projects that i'm building or hacking on
CameraUploads -> symlink to my NextCloud camera upload folder
Documents -> some random documents migrated from Dropbox days
Downloads -> Downloads, organized by year, with cur year in root
notes -> textfile notes
ongoing -> catch all to get rid of stuff that i am not quite done with yet
personal-records -> water & power bills, medical records, pay stubs, etc
pics -> photos (mostly screenshots) from this PC specifically
projects -> my own projects that i'm working on (mostly git repos)
tmp -> theoretically, safe to delete at any time .... theoretically
BACKUP.TODO -> a textfile showing what i still need to back up out of my digital empire
Re: Tips on how to structure your home directory (2023)
#90I 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…
Pro tip: don't put your stuff in your $HOME directory. $HOME is for applications to pollute. Put your stuff literally anywhere else.