News for hackers. Stuff that matters.
Re:No_color by systemvoltage on Saturday February 26, 2022 @08:01PM (#30484150)
Unrelated but is there a standard that keeps my ~/ home directory clean? I don't want billion apps to write ~/.foo_software_config to my home dir. It is a complete mess.
Re:No_color by cturtle on Saturday February 26, 2022 @08:11PM (#30484232)
Yep, the XDG Base Directory specification [0]. Specifically the $XDG_CONFIG_HOME variable.

[0]: https://specifications.freedesktop.org/basedir-spec/basedir-...

Re:No_color by heavyset_go on Saturday February 26, 2022 @09:47PM (#30484860)
That's a standard that apps need to adhere to. It doesn't stop apps from polluting $HOME[1].

[1] https://news.ycombinator.com/item?id=30379890

Re:No_color by account42 on Wednesday March 02, 2022 @08:54AM (#30527309)
All standards are by definition something that needs to be adhered to and don't magically stop anything. If you want to force uncooperative programs to behave there are different tools for that.
Re:No_color by samesamebutsame on Saturday February 26, 2022 @08:24PM (#30484337)
The few things I have written always have the configs in here, seems like the polite thing to do without cluttering up home for the end user, but I can't help laugh when I look my own system and apps are storing gigabytes of data in there.

It's not really a config folder anymore, more a misused general store for files.

Re:No_color by cturtle on Saturday February 26, 2022 @08:26PM (#30484355)
Yeah, if an app were truly compliant it would store caches in $XDG_CACHE_HOME and data (icons, packages, sounds, images, level data, etc. required for behavior) in $XDG_DATA_HOME. It's unfortunate that not all apps follow it
Re:No_color by account42 on Wednesday March 02, 2022 @08:58AM (#30527345)
$XDG_CACHE_HOME makes sense as having a directory that you can just blow away without fear but the $XDG_DATA_HOME / $XDG_CONFIG_HOME split, while not entirely unjustified, causes more problems than it solves because a) it is not always clear what is data and what is config, b) peeople disagree on what is data and what is config and c) other operating systems don't make this distinction for application files so ported software is almost guaranteed to just pick one and call it a day - so in practice you have both config and other data spread between ~/.local/share and ~/.config.
Re:No_color by loeg on Saturday February 26, 2022 @08:05PM (#30484186)
Nowadays well-behaved apps tend to use a single file or directory under ~/.config/. I believe it is a FreeDesktop.org standard: https://specifications.freedesktop.org/basedir-spec/latest/a...
Re:No_color by ziml77 on Saturday February 26, 2022 @09:42PM (#30484828)
And on Windows that has just made the mess even worse. Applications writing to %USERPROFILE%\Documents, %APPDATA%, %LOCALAPPDATA%, %USERPROFILE%, and %USERPROFILE%\.config

Every language needs something like this library as part of the standard library https://pypi.org/project/appdirs/ It would at least make it a little more likely that files end up where they should.

Re:No_color by sneak on Saturday February 26, 2022 @08:10PM (#30484221)
XDG I believe is the name of the standard.

https://wiki.debian.org/XDGBaseDirectorySpecification