News for hackers. Stuff that matters.
Re:Dotfile Madness by slondr on Sunday October 23, 2022 @08:31PM (#33311710)
XDG has real practical benefits, though.
Re:Dotfile Madness by fiddlerwoaroof on Sunday October 23, 2022 @10:57PM (#33312526)
I 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*`
Re:Dotfile Madness by kragen on Sunday October 23, 2022 @11:08PM (#33312585)
I 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.
Re:Dotfile Madness by fiddlerwoaroof on Sunday October 23, 2022 @11:22PM (#33312649)
That still works if it’s `~/.foo/cache`
Re:Dotfile Madness by Macha on Monday October 24, 2022 @08:14AM (#33315687)

    rm -r ~/.foo/cache ~/bar/cache ~/baz/data/app/cache [20 more apps..]
is less ergonomic than

    rm -r ~/.cache/\*
Re:Dotfile Madness by Macha on Monday October 24, 2022 @11:31AM (#33318028)
I 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
Re:Dotfile Madness by fiddlerwoaroof on Monday October 24, 2022 @11:34AM (#33318070)
There’s always:

    rm -rf ~/.*/cache
Re:Dotfile Madness by Macha on Monday October 24, 2022 @11:49AM (#33318291)
Assumes the app uses cache as it's cache, rather than names like dlcontent, bananas_content, storage.sqlite, assets, meta, $TIMESTAMP.txt etc.
Re:Dotfile Madness by fiddlerwoaroof on Monday October 24, 2022 @12:34PM (#33318905)
Well, 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)
Re:Dotfile Madness by jsmeaton on Sunday October 23, 2022 @11:24PM (#33312662)
Asked 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?
Re:Dotfile Madness by fiddlerwoaroof on Sunday October 23, 2022 @11:54PM (#33312783)
Not 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)
Re:Dotfile Madness by jsmeaton on Monday October 24, 2022 @05:57AM (#33314656)
I 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)

Re:Dotfile Madness by codedokode on Monday October 24, 2022 @12:54AM (#33313062)
It is convenient because you can delete ~/.cache any time without losing configuration files.