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
but please don’t hard-code
~/.config
or$HOME/.config
. Use theXDG_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)
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.
Please use
$XDG_CONFIG_HOME
(and other XDG base dirs)It’s still a lot better that creating random .folders per application in your home.
The font in the screenshot makes me angry.