fjira icon indicating copy to clipboard operation
fjira copied to clipboard

Follow "XDG Base Directory Specification" for config path

Open pataquets opened this issue 1 year ago • 5 comments

Is your feature request related to a problem? Please describe. Despite fjira being so awesome :wink:, it keeps cluttering my $HOME dir with its cofig dir.

Describe the solution you'd like Using $XDG_CONFIG_HOME env var would make more sense.

Describe alternatives you've considered N/A

Additional context Spec docs: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html

pataquets avatar Jun 17 '24 23:06 pataquets

@pataquets thanks for a reported issue! :)

mhm, I can look for $XDX_CONFIG_HOME, and then use $HOME as a fallback, - what do you think?

mk-5 avatar Jun 18 '24 07:06 mk-5

Sounds great. Also, this is how I've seen this solved elsewhere most of times.

pataquets avatar Jun 18 '24 08:06 pataquets

added in version 1.4.1

pls check @pataquets

mk-5 avatar Jun 26 '24 18:06 mk-5

Not working... After some double-checking the mv, I took a peek at the code. The correct env var name is XDG_CONFIG_HOME. Turns out I failed to spot the XDX_ name in your initial response, sorry for not catching that :worried: Also, on a cursory reread of the spec, there is XDG_CONFIG_HOME with some fallbacks. The pattern I'm used to most frequently is to check for confs at XDG_CONFIG_HOME/fjira (notice missing dot) -> HOME/.fjira and, if none found -> create dir XDG_CONFIG_HOME/fjira

pataquets avatar Jun 27 '24 03:06 pataquets

@pataquets ahh fuck, right. I will adjust it :)

mk-5 avatar Jun 27 '24 07:06 mk-5

@pataquets you can check version 1.4.2 - it should go in a way you have described in the last comment

mk-5 avatar Sep 09 '24 19:09 mk-5