Open alfonsrv opened 4 years ago
or ~/.config/zulip/zuliprc
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)
.zuliprc
and the xdg path? Which takes priority?.config
? We should check with the main project.xdg
library to handle the ~/.config
aspect, though it's python3.6+ (we use 3.5+ currently)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 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. :)
xdg
path would be better, because of the above reason. Having a .zuliprc/
directory would still mean one extra clutter in the home directory?zulip/zulip
maybe?), but we could use ~/.config/zulip-term/zuliprc
, hinting the name of the PyPi package that we currently go with?~/.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. :)@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 :)
yes, please follow XDG properly :)
https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
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.