zulip / zulip-terminal

Official Zulip terminal client.
Apache License 2.0
625 stars 243 forks source link

Improve zuliprc location/specifying (eg. dot-file or .config/) #678

Open alfonsrv opened 4 years ago

alfonsrv commented 4 years ago

Following the configuration of other terminal-configuration files, the default zuliprc file should be called .zuliprc without having to explicitly specify it using the -c switch.

Jellby commented 4 years ago

or ~/.config/zulip/zuliprc

neiljp commented 4 years ago

This was discussed on chat.zulip.org in #backend>storing client settings in May, among other aspects.

From my perspective a dotfile would be good, but standardizing on ~/.config/zulip/zuliprc would be better (or a good addition).

Aspects to consider: (possibly to update later)

neiljp commented 3 years ago

Another benefit of some kind of .zuliprc/ rather than a simpler file approach, is that this provides a namespace that ZT can use, including treating the filenames (or names without eg. a .zuliprc extension) as names for each server connection.

Since py3.5 is now EOL, this opens up the use of xdg after we migrate to py3.6.

zee-bit commented 3 years ago

@neiljp I too think ~/.config/zulip/zuliprc would be better approach than having a .zuliprc, mainly because having just one sub-directory instead of a number of dot files(for different profiles) and/or dot directories will reduce clutter when "hidden" files are displayed in GUI, and ofcourse pushing all user-configuration files to a dedicated sub-directory is always an attractive solution. :)

neiljp commented 3 years ago

@zee-bit See #961 for my general thoughts on this, which should clarify some of these points.

Re checking with the main project, I meant what namespace we should use under .config - zulip? zulip-terminal? This could tie in with improving the server/webapp approach to saving/naming zuliprc files, potentially - but for now we would need to rely on users saving/naming them appropriately, unless we generate them.

There is potentially quite a lot of scope for organizing these settings better, particularly where multiple sessions are involved, and we'd need this independently of #961.

I'd expect an end result could now look something like

$XDG_CONFIG_HOME/zulip/
  org1.zuliprc
  org2.zuliprc
  czo.zuliprc
  zulip-term.conf

with the config from zulip-term.conf being able to be replaced by specifics in org1.zuliprc. We'd retain backwards compatbility via zulip-term -c some_zuliprc (which would pick up defaults from zulip-term.conf), but also have a positional input enabling zulip-term czo or zulip-term org1.

Those names are of course subject to discussion :)

xeruf commented 1 year ago

yes, please follow XDG properly :)

https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html