Supporting XDG Base Directory Specification
Hey everyone,
I've been playing around with ssbc recently, and first of all: Thanks for that wonderful piece of software. 💜
One thing jumped to me: config location was hardcoded to $HOME/.ssb. Would you be interested in supporting the XDG spec?
To be explicit, I'd be willing to make it work myself if need be.
I don't think anybody would mind a patch for this :)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I think the next steps on this would be to:
- Move
~/.ssb/configto$XDG_CONFIG_HOME, usually~/.config/ssb/ - Move
~/.ssb/to$XDG_DATA_HOME, usually~/.local/share/ssb/
The only rename would likely be for the config file, maybe ~/.config/ssb/config.json?
I think the only hiccup here is that ssb-config defines only a single path so we'd need to split that into two so that it points to ~/.local/share/ssb while only the config points to ~/.config/ssb/.
i'm :+1: on this: https://github.com/ssbc/ssb-config/pull/26
at the moment, ssb-config uses rc, which gathers up the config from various (non-configurable) sources. i'd be keen if we ditched rc to gather up the config from $XDG_CONFIG_HOME, then pass in $XDG_DATA_HOME as the path for ssb-server (and flume) things, which will hopefully work as i discovered ssb is surprisingly non-configurable with respect to any file paths (there's only a single path config var).
rc puts the configuration in the traditional places. these are widely understood to be where configuration goes, and many other programs do the same thing. That's the reason rc is unconfigurable - being configurable just means someone can put it in a weird place.
At this point, changing it will have much more impact purely from the cost of the change, that I think it will take quite a bit more effort to fix than this is really worth.
@ahdinosaur does this mean if I set XDG_DATA_HOME to $HOME/.local/share it should just work?
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?