Hello old new “Projects” directory
38 points by FedericoSchonborn
38 points by FedericoSchonborn
I've had ~/src/ for a very long time. I'm way to lazy to type out all those extra chars.
You can customize their paths. https://wiki.archlinux.org/title/XDG_user_directories#Creating_custom_directories
Feel you. Mine evolved into just ~/w (so it's always cd + cd w away. I guess, it stands for "work", or maybe "web".
I use ~/src (or ~/repos previously) for other people's code. For easy grepping and history digging.
I've been using ~/projects for yeeeeeears. I guess I'll have to start uppercasing the name.
I've had a ~/Development directory for repositories/projects for years, and this seems like a very nice addition that I'll likely adopt as a replacement.
I have had "Repositories" folder for this, but I might change to Projects!
Sounds like a useful addition. Thinking about directories as "namespaces" makes me wonder, is there any formal- or semi-formal registry of where programs store their project or configuration files? Suppose the Kitty terminal writes a config file to ~/.config/kitty/kitty.conf, but some other program named "kitty" attempts to use that same directory. Are there any standardizations that help prevent these sort of conflicts?
As long as program names are reasonably unique, I can't see this becoming a problem on most systems, but it's still something I wonder about.
When executable names conflict, you need to do something about this just to have both in PATH, I guess you can patch the config path too, while you are at it?
Flatpak stores each app's stuff in .var/app/$FLATPAK_ID where the ID is supposed to be based on the domain e.g., org.gnome.Builder
Nice that I somehow stumbled into using the new default. I've had a ~/Projects for a decade or two. Initially the capitalisation was for consistently with Mac OS X, but I carried it across to Linux too.
I really want an explicit opt-in to xdg (for systems where xdg isn't the default choice - e.g. macOS). The way this needs to work is that there's another env variable / setting somewhere that says to use XDG for the mode.
This can't be XDG_HOME - that's the location, but setting it is not enough to be able to actually opt-in. There are many issues in a variety of libraries for various languages that explicitly choose the operating system default folders instead of XDG_HOME because it's mostly natural.
Basically this should be a "I know what I'm doing here - use XDG"
Previously: https://hn.algolia.com/?dateRange=all&page=0&prefix=true&query=joshka%20xdg&sort=byDate&type=comment