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

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

Open
alfonsrv opened this issue Jun 8, 2020 · 6 comments
Open

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

alfonsrv opened this issue Jun 8, 2020 · 6 comments
Labels
area: config enhancement New feature or request further discussion required Discuss this on #zulip-terminal on chat.zulip.org GSoC Possible GSoC project component
Milestone

Comments

@alfonsrv
Copy link

alfonsrv commented Jun 8, 2020

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
Copy link

Jellby commented Jul 10, 2020

or ~/.config/zulip/zuliprc

@neiljp
Copy link
Collaborator

neiljp commented Jul 12, 2020

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)

  • Should we support both .zuliprc and the xdg path? Which takes priority?
  • What name should we use within .config? We should check with the main project.
  • We could use the (tiny) xdg library to handle the ~/.config aspect, though it's python3.6+ (we use 3.5+ currently)
  • We should probably separate zuliprc files and one config file, to allow updating the connection details and config separately

@neiljp neiljp added enhancement New feature or request further discussion required Discuss this on #zulip-terminal on chat.zulip.org labels Jul 22, 2020
@neiljp neiljp added this to the Release after next milestone Aug 30, 2020
@neiljp
Copy link
Collaborator

neiljp commented Nov 3, 2020

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.

@neiljp neiljp changed the title make zuliprc a dot-file Improve zuliprc location/specifying (eg. dot-file or .config/) Nov 3, 2020
@neiljp neiljp added the GSoC Possible GSoC project component label Mar 26, 2021
@zee-bit
Copy link
Member

zee-bit commented Mar 27, 2021

@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. :)

  • Thus, I believe supporting just the xdg path would be better, because of the above reason. Having a .zuliprc/ directory would still mean one extra clutter in the home directory?
  • I am not completely sure what do you mean by "main project"(zulip/zulip maybe?), but we could use ~/.config/zulip-term/zuliprc, hinting the name of the PyPi package that we currently go with?
  • Since v3.5 is probably EOL, their shouldn't be any issue with any of these points.
  • We could place all the config details in ~/.config/zulip-term/<config-file> this would be common for all organizations. And, all the user-profile for organizations could be placed in .zuliprc/ as you said, but deciding a specific name format should be the main challenge in my opinion. :)

@neiljp
Copy link
Collaborator

neiljp commented Mar 28, 2021

@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
Copy link

xeruf commented Sep 15, 2022

yes, please follow XDG properly :)

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: config enhancement New feature or request further discussion required Discuss this on #zulip-terminal on chat.zulip.org GSoC Possible GSoC project component
Projects
None yet
Development

No branches or pull requests

5 participants