6 ms·
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 f
by bee_rider 4y ago
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.
- slondr 4y agoXDG has real practical benefits, though.
- fiddlerwoaroof 4y agoI personally hate the XDG directories. It’s annoying for different part of an application’s data to be split between `~/.config`, `~/.Cache`, etc. Rather than for all the data for the `foo` program to be in a file named something like `~/.foo*`
- kragen 4y agoI find it useful; I might want to version-control .config but definitely not .cache. And if the program is broken I might blow away .cache but not .config.
- fiddlerwoaroof 4y agoThat still works if it’s `~/.foo/cache`
- Macha 4y agorm -r ~/.foo/cache ~/bar/cache ~/baz/data/app/cache [20 more apps..] is less ergonomic than rm -r ~/.cache/\*
- Macha 4y agoI think HN escaped the * in that final line before I edited it into a code block and my edit window is expired so I can't fix it
- fiddlerwoaroof 4y agoThere’s always: rm -rf ~/.*/cache
- Macha 4y agoAssumes the app uses cache as it's cache, rather than names like dlcontent, bananas_content, storage.sqlite, assets, meta, $TIMESTAMP.txt etc.
- fiddlerwoaroof 4y agoWell, I don’t mind standards, I just prefer all the files an app touches to be under a single root folder (that’s not just $HOME)
- jsmeaton 4y agoAsked out of ignorance, but do the envvars not allow one to easily co-locate data/config/cache by setting them all to the same value?
- fiddlerwoaroof 4y agoNot in a way that would be useful here, I think: I prefer ~/.firefox/cache to ~/.cache/firefox and this requires the variables being unique per program (although, you could probably wrap each program with a script that sets the relevant environment variables to achieve this effect)
- jsmeaton 4y agoI was thinking along the lines of ~/.data/{prog} without requiring further subdirs. The config, data, and cache would all coexist within the same directory per program Each of the data, config, and cache envvars would all be set to ~/.data in this setup (though “data” isn’t a name I’d use)
- codedokode 4y agoIt is convenient because you can delete ~/.cache any time without losing configuration files.
- hyperupcall 4y agostrongly 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/ https://xdgbasedirectoryspecification.com/
- kragen 4y agoMy home directory has dotfiles for aspell, bash, bzr, cargo, Clojure, CPAN, CVS, Darcs, D-BUS, Dillo, DOSBox, DOSEmu, Emacs, Eclipse, Emacs, ESD, FLTK, fontconfig, FontForge, GForth, GHC, the GIMP, Git, GnuPG, Gnuplot, Guix, IceWM, Idle, Java, John the Ripper, Jython, Links2, MilkyTracker, Mozilla (Firefox), MPlayer, Nethack, Octave, Racket, R, Skeinforge, Slic3r, SSH, SQLite, Subversion, Units, Vim, W3M, WINE, X-Windows, XScreenSaver, and zsh, which is 51 "apps". Some of those have been there since last millennium, and it would not improve my user experience for those "apps" to look for my configuration file in two different places, or to stop looking in the place they've been looking for decades. (God forbid I should use remote CVS again, but if I do, I sure don't want to have to debug where the fuck it's sticking .cvspass now.) There are another 41 things in .config, including Bitcoin, Calibre, Chromium, DjVuLibre, Gomuks, htop, Inkscape, Mumble, OpenSCAD, Transmission, and other things. If I had to choose, I would say that those are the things "going against the grain of the ecosystem". But I think it's fine. As long as it doesn't change in another ten years to be .Config, or .conf, or Configuration, or either Configuration or Configuración depending on whether I installed the machine in English or Spanish. Because then I am seriously going to look into government surplus cruise missiles.
- guilherme-puida 4y ago> it would not improve my user experience for those "apps" to look for my configuration file in two different places Some of those already do, though. At least Vim and Emacs do, and I personally have zsh in .config as well.
- 4y ago
- pigbearpig 4y agoXDG is like four env vars. Doesn’t seem like much noise.
- smeagull 4y ago> dropping config files in .programname is the de-facto community standard. Fuck you so much.
- dang 4y agoPosting like this will get you banned on HN. No more of this, please, regardless of how strongly you feel about config files. Also, would you please stop posting unsubstantive/flamebait comments more generally? It's not what this site is for, and it destroys what it is for. https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html
- claytongulick 4y agoThere's no call for that. I don't have the ability to flag, @dang or others?
- alwillis 4y agoIf people want to follow XDG that's fine, but I can't blame anybody who wants to ignore all that noise. Literally every program I’ve installed for the last several months--WezTerm, Neovim, bat, broot and many more just use XDG by default. Most of the time, the user doesn’t have to do anything, though they might initially be confused if they’re looking for their config files.
- scintill76 4y ago> XDG is just some group vs > the de-facto community standard Feels like you’re just selectively defining “community” to exclude XDG. Maybe there’s a good reason, but you haven’t really described it. Whoever defined $HOME as a place to stick configuration files was also “just some group.”
- blueflow 4y agoFreedesktop (new name for XDG) is not the community. They are some people with a bad reputation when it comes to software quality and maintenance.
- chimprich 4y ago> XDG is just some group or whatever So are ISO, W3C, IETF, etc. > dropping config files in .programname is the de-facto community standard Dropping litter and open-air defecation are de-facto community standards in some unfortunate parts of the world. That's not an argument to keep doing it.