Adherence to XDG Base Specification #68
Replies: 2 comments 3 replies
-
While, admittedly, I don't have much skin in this game. Of course I'd vote we use this standard in some way, since like you said allowing users better control over their systems should be a priority. But otherwise it likely will be much simpler to use a single directory. Because then we just worry about setting And personally I'd vote that to me, the config directory makes since. Since really no matter what that folder will contain a config. It won't always contain packages, unless the user installs them. So to me that seems like the right choice |
Beta Was this translation helpful? Give feedback.
-
I wonder if we could/should at look at implementing https://github.com/folder/xdg. It deals with all major OS paths, not just XDG on Linux. |
Beta Was this translation helpful? Give feedback.
-
Started from this Discord conversation
So I'm almost certain this question will come up eventually so thought it best to pre-empt it seeing as it has frequently come up on the Joplin project.
Basically it seems that Pulsar (by way of Atom) has its Config folder set to
~/.atom
on Linux (and macOS).This by itself isn't really an issue as such but there is mounting pressure for projects to correctly adhere to the XDG Base Directory Specification rather than forcing configuration files and application data to write to a specific location chosen by the developers.
Pulsar/Atom can already be made to adhere to it by exporting
ATOM_HOME
:export ATOM_HOME="$XDG_CONFIG_HOME"/atom
(and the same forapm
).There are a few benefits to supporting the XDG spec:
We are at a point, being at the very start of the project really, where we could look at implementing this with as little impact on users as possible.
There are potentially a few things we would need to look out for, such as any quirks or clashes with the portable mode.
One thing of note is that Electron by default already does seem to support
$XDG_CONFIG_HOME
as this is where it will write theAtom
electron cache (~/.config/Atom) and it does change location depending on the location of your$XDG_CONFIG_HOME
.The other question is, what is actually the correct place. You will note that both the Arch wiki page on the topic recommends setting
ATOM_HOME
to$XDG_DATA_HOME
rather than$XDG_CONFIG_HOME
as does the Flatpak script above.So either we would need consensus as to which is correct or we look at splitting the current
.pulsar
directory between them to support both data (packages in particular) and config files in different places.Another alternative is that we put the
~/.pulsar
inside the existing$XDG_CONFIG_HOME/Pulsar
Electron cache folder - which is exactly what VSCode seems to do. Then we only have one folder to worry about and not two.There are a few more resources if you want to have a look at other info or conversations on the topic.
Beta Was this translation helpful? Give feedback.
All reactions