Live data from Hacker News

Dotfile madness (2019)

0x46.net

1–10 of 185 posts

Re: Dotfile madness (2019)

#2
A lot of software that does not default to using XDG directories can be coerced into it, usually with environment variables or just manually creating config in a secondary supported XDG location - the arch wiki is the best source of info on that: https://wiki.archlinux.org/title/XDG_Base_Directory

Re: Dotfile madness (2019)

#3
Eh, I dunno. XDG is just some group or whatever, dropping config files in .programname is the de-facto community standard. If people want to follow XDG that's fine, but I can't blame anybody who wants to ignore all that noise.

Re: Dotfile madness (2019)

#4

Eh, I dunno. XDG is just some group or whatever, dropping config files in .programname is the de-facto community standard. If people want to follow XDG that's fine, but I can't blame anybody who wants to ignore all that noise.

XDG has real practical benefits, though.

Re: Dotfile madness (2019)

#5
> You will most likely want to create a default configuration file with sane and sensible default values the first time your program is executed.

Please don't. Include the example configuration in your docs (/usr/share/PROG..) and mention it in the manual. Statistically user will have hundreds of apps installed but will only ever customize a small fraction them. So creating config unconditionally on first run is one of the worst contributors to homedir pollution.

Another argument is version upgrades: if you create configur on first run, you forever bake in the set of options present in that version. If later a new option is added, user will have no idea about it.

Re: Dotfile madness (2019)

#7
I completely agree! That's why I created this site: https://xdgbasedirectoryspecification.com. We need some place where people can immediately understand the practical benefit, and the minimum ask of their users.

Of course, it doesn't help just to complain about the issue in a void, so I've also submitted like 10 PRs and filed quite a few issues. Projects like pnpm and Poetry took note, and now they comply!

Someone's gotta clean up house, and I don't mind doing the dirty work.

Re: Dotfile madness (2019)

#8
The solution is simple, stop messing your home and put personal data in

/home/you/personal/

source code in

/home/you/src/

The home is not a place supposed to store random "regular files"

Re: Dotfile madness (2019)

#9

Eh, I dunno. XDG is just some group or whatever, dropping config files in .programname is the de-facto community standard. If people want to follow XDG that's fine, but I can't blame anybody who wants to ignore all that noise.

strongly disagree - as of 2022, more apps follow the XDG Base Directory Specification than not - in fact, by a wide margin. So by "doing dirty" in your users home directory, you're going against the grain of the ecosystem.

It doesn't seem like you understand much about the specification? I'd recommend reading it, or at least a short summary I've made available here: https://xdgbasedirectoryspecification.com/

Post reply on HN