Please use .config π
Please use .config π
Please use .config π
Attention electron developers: under no circumstances do I want your entire app in .config.
You feel the curling of the monkey's paw; the entire app is now in ~/.local/AppName
Even better, ~/.local/share/
I mean... At least that's more correct... If the monkey's paw is giving us things that are better but not ideal i'm gonna use the fuck out of it.
As an alternative, how about my entire cache in .config
?
Looking at you VSCode, with 3 unique cache folders.
but please don't hard-code ~/.config
or $HOME/.config
. Use the XDG_CONFIG_HOME
environment variable, with $HOME/.config
as a fallback if it's not set.
Many programming languages have a cross-platform implementation of this built in to their standard library. C# has Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)
which uses XDG_CONFIG_HOME on Linux, local AppData on Windows, and whatever is the correct thing on MacOS (not very familiar with how things work on MacOS)
On macOS, the correct thing to use is usually NSUserDefaults API, or - [NSFileManager URLsForDirectory:inDomains:]
with NSApplicationSupportDirectory (gives a list of paths to find your config file in, like XDG_CONFIG_DIRS)
Thanks for the info. It looks like that's what .NET / C# uses: https://github.com/dotnet/runtime/blob/2b60d82ef3e87876128b7f71922a1b72908b6fcf/src/libraries/System.Private.CoreLib/src/System/Environment.GetFolderPathCore.Unix.cs#L103
Never new about this! That's very handy
In Python the equivalent library is platformdirs
It's still a lot better that creating random .folders per application in your home.
Nah just put it in ~`/.thing-config.d/01-0x45- 110100100-main.options-extra2cache.swp` along with three godzillion other files like it's normal and very sane for users who edit such files to have the big picture of the default configuration dreamed up by some utterly deranged lunatic be spread across enough files to represent all known stars in the galaxy, standards are for losers amirite /s
XDG? OpenDesktop? Dunno what that is, time to dump everything into ~/.myawesomeapp
Oh, no. Don't even make it a hidden folder, it needs to be right there, front and center. And make sure you use a bunch of capital letters in the name, because you're so fucking important.
Just dump it in ~
It really depends for what. I don't think nginx config should be in $HOME/.conf/
Right? It goes into ~/Documents/
SMH my head
Unless it's running as your own user as part of your session. /etc
for system-wide and ~/.config
for your own user makes a lot of sense.
They want ~/etc/
in their home, which just seems like a renamed ~/.config/
.
Please use $XDG_CONFIG_HOME
(and other XDG base dirs)
Iβve been forcing myself to learn to use NixOS with home-manager just to avoid this. Not to worry, itβs just my home.nix thatβs a dumpster fire now
I've been using Nix for a little more than a year, I don't think I've touched my configs in better than 6 months. I'm honestly not entirely certain what would constitute a dumpster fire in a Nix config
I've probably only modified 50 or 60 lines of the default configs.
I do have a folder full of shell.nix files when I need to do a special workflow, like I have one that kicks up wine and sets up mp3tag, another that sets up rust, another sets up Python, and one that sets up for yt-dlp. But I don't carry anything in my base configs that I don't use in a given week
I set up a nix os for a friend once. Forgot the master password. It's been 5 years. Oh well.
Just give me ~/etc/
Isn't that just .config?
Use xdg-ninja to help clear out unwanted files not in your home folder, and give tips to move them into a normal folder like .config
laughs in home-manager
I keep my home directory nice and tidy in terms of visible files/folders, but as soon as you ls -a there's so much random shit
I'm in this picture and I don't like it
I think this picture would be an upgrade from my current situation. It is perfectly normal to have to use sudo find from root to locate anything, isn't it? It's especially fun when you don't remember what the thing you are looking for is called and are trying to guess the name to find.
I just throw lots of dumb shit in my home directory. I actually have the Windows Entertainment Pack for Windows 3.1 in a folder in there. Runs great in WINE. Home directory is great for storing random files.
Laughs in NixOS
Nixos still slaps your home route with a bunch of . Files
Is that the Stanley cup in the first image?
First line of my /etc/profile:
export XDG_CONFIG_HOME=~/