Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Follow "XDG Base Directory Specification" for config path #117

Closed
pataquets opened this issue Jun 17, 2024 · 6 comments
Closed

Follow "XDG Base Directory Specification" for config path #117

pataquets opened this issue Jun 17, 2024 · 6 comments

Comments

@pataquets
Copy link

pataquets commented Jun 17, 2024

Is your feature request related to a problem? Please describe.
Despite fjira being so awesome 😉, 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

@mk-5
Copy link
Owner

mk-5 commented Jun 18, 2024

@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?

@pataquets
Copy link
Author

pataquets commented Jun 18, 2024

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

@mk-5
Copy link
Owner

mk-5 commented Jun 26, 2024

added in version 1.4.1

pls check @pataquets

@pataquets
Copy link
Author

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 😟
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

@mk-5
Copy link
Owner

mk-5 commented Jun 27, 2024

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

@mk-5
Copy link
Owner

mk-5 commented Sep 9, 2024

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

@mk-5 mk-5 closed this as completed Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants