-
Notifications
You must be signed in to change notification settings - Fork 11
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
XDG base directory spec compliance #29
Comments
@robn for your consideration :) |
I have thought a lot about this over the last few days, and I will do my best to keep this succinct. The specific thing I actually want: totally distinct and isolated notmuch+mujmap+neomutt setups for home and for work. This is possible right now through creative use of notmuch environment variables, but its fragile and kind of a pain too. XDG dirs are only incidental to that. I don't personally think XDG dirs are particularly compelling in general, because my preference is to group related things together in a single dir so I don't get lost. But, they're the way that notmuch has chosen to provide a convenient split config method via I believe we can cover both your and my wants comfortably as follows:
Notes:
I will have a crack at this and see what comes out. There'll be some daft surprise I'm sure, but its still sitting well we with me after a few days chewing on it so I reckon its somewhere close. Hopefully I am not a total fool! |
mujmap is based on lieer Lieer in terms of configuration layout, and has the following requirements:
mujmap.toml
) is in a directory which is at the root of or a subdirectory of a notmuch-managed mail directory.mujmap.state.json
) and lock file (mujmap.lock
) generated by mujmap are placed in this same directory.According to the XDG base directory spec, the correct locations for these files are:
mujmap.toml
:
$XDG_CONFIG_HOME/mujmap/
mujmap.state.json
:
$XDG_DATA_HOME/mujmap/
mujmap.lock
:
$XDG_RUNTIME_DIR/mujmap/
However, I’m not sold on the usefulness of changing mujmap to comply with this spec, as the following problems arise:
Filesystems shared between two operating systems on the same device would have to maintain independent configurations of the same maildir. You could argue that given mujmap’s purpose, you could just synchronize instead, but if you have gigabytes and gigabytes of mail then this could be wasteful.
Similar to above, the current system “just works” on networked filesystems.
This might be a matter of opinion, but the configuration process might become more confusing. mujmap would need to support multiple maildir configurations in the same config file, and these configuration options would need to point to specific mail directories. The
-C
option would need to be replaced with something like--name
.Perhaps I specifically am biased to think that the way lieer does it is easier because I am used to using it already for my work email. But I do think there is something somewhat intuitive to the concept of “this mail directory contains the mujmap config/state, therefore the mail files here are owned by mujmap”, and it also communicates to the user “you can have separate mujmap setups, and they are all independent by design” in a clear way.
This issue exists both as a space for me to explain why mujmap is the way it is and also a place for people to try and convince me that I’m wrong.
The text was updated successfully, but these errors were encountered: