3) $XDG_CONFIG_HOME/app: this is skippable, but it's where most modern users expect you to create your configs and is better than the Old Ways in that it makes $HOME less cluttered and makes it easier to version-control your config files. (If this isn't set, default to $HOME/.config)
4) $HOME/.app: if you accept the above, this is optional. Otherwise... uh... everything goes here. Create if does not exist.
Oh and accept ~ and $ENVVARS in your config. FFS.
Once and for all, if you want to know where to put user config and data, search these in this order:
1) Environment variable. $APP_THING (config, data, etc). Not necessary for all apps, but if you're... say... MAME, and your configs are probably right next to 700GB of ROMS... yeaaaah probably add this one so users can point you to that second hard drive they've got.
2) /etc/app: this is where SYSTEM defaults live. If it exists, load it and continue searching. Use the values here as fallback.
And while I'm ragging on bad places to put your user configs and ancillary data...
Don't place data relative to your executable. Just don't. Finding yourself is a pain and it's a dumb idea because you don't know where that exe's gonna be.
If I can't just put your application in /bin, that is a bug.
This just happened. I'm not even kidding.
I mean, to be clear I am 100% down with random-ass Dune references in songs. I just dunno how it got big.
And I'm not even hardcore anti-piracy. I've totally pirated shit. And I have my reasons and personal justifications. But this pseudo-righteous bullshit pisses me off. Pirating things doesn't make you a fucking hero.
"Cyberpunk 2077 doesn't support Linux so we don't want to give it money but we want to play it and therefore we should pirate it but it's fine because because CDPR probably doesn't pay its employees enough" is... certainly A Take.
I mean, it's not complicated. People who make things you like deserve money. If you're boycotting the thing because you don't want to give them money, you don't get to have the thing.
Like, you're either Counterfeit Monkey or you're Flexible Survival and there's no middle ground.
By the way, Counterfeit Monkey is great.
Eminently distractable alleged programmer. 19/M. Confidently wrong and paradoxically shy. You're not getting much personal information out of me here.