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/
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 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)Never new about this! That’s very handy
Please use
$XDG_CONFIG_HOME
(and other XDG base dirs)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
Is that the Stanley cup in the first image?
First line of my /etc/profile:
export XDG_CONFIG_HOME=~/
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’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 /sThe font in the screenshot makes me angry.
Hey! Would you mind guiding me as to what is going on in this picture? Is this an APP that allowed to SSH into your server? You got my attention with this picture, and I’m curious to hear more.
It’s Termux, basically a fully fletched terminal for Android. So you can install various tools via apt, and use them, for example yt-dlp, ffmpeg, gcc, python etc. And yes, you can also use SSH, both as server and client. I use it very often to connect to my servers on the go.
You can even use chroot to basically run a distro of your choice.
Damn, that sound pretty cool, thanks for the info!
It’s also incredibly useful to backup /sdcard via rsync or Borg every night automatically
Or access the contents of your phone via SFTP
I like using syncthing. It syncs all my apps that are backed up with neobackup, my pictures, files etc. to my NAS. Then my NAS runs borg on that directory as well as all the other important NAS directories to make the legit backups.
I have termux installed but I honestly rarely use it. Hate typing on the phone in the terminal… if I need to do it then I’ll just adb connect from my computer and do it from there on a real keyboard.
It really depends for what. I don’t think nginx config should be in $HOME/.conf/
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.