-
-
Notifications
You must be signed in to change notification settings - Fork 263
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
add XDG_CONFIG_HOME for py3status, organize paths #1694
Conversation
py3status/cli.py
Outdated
@@ -63,6 +63,8 @@ def parse_cli(): | |||
# i3status config file default detection | |||
# respect i3status' file detection order wrt issue #43 | |||
i3status_config_file_candidates = [ | |||
"{}/py3status/py3status.conf".format(xdg_home_path), | |||
"{}/py3status/config".format(xdg_home_path), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think having one file ~/.config/py3status/config
is enough, no need to introduce multiple alternatives - this one is similar to ~/.config/i3status/config
, let's go with it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have three i3status.conf
and not one py3status.conf
... and if users don't like ~/.config/py3status/config
, they have an option to use py3status.conf
... then -c
.
What stands out... ~/.i3/i3status.conf
, ~/.config/i3/i3status.conf
, etc. They all are in "wrong" / convenience places... and it looks like /etc/xdg/i3status/config
is nearly at end of the list instead of nearly at top of the list according to i3status man page. Is i3status man page wrong or out of date?
EDIT: We can't say py3status.conf
if we don't support it. Put the name out there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cannot imagine why someone would not like ~/.config/py3status/config
if that's a perfectly reasonable XDG compliant file name, my point was just that we already have a zoo of config locations and adding two more seems excessive, one is enough in my mind. But I don't have a strong opinion, so I approve the PR. Perhaps worth getting others' opinions before merging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have a strong opinion too. I personally use ~/.config/py3status/bottom.conf
... and if I really need more, I will turn on top.conf
or test.conf
.
Also, because it's easier to jump open v py3status.conf
in shell than v py3 config
... not working or opening wrong one... so you do v config py3st conf
. Random examples.
Other than that, I think we should support ~/.config/py3status/py3status.conf
because this PR would make it xdg friendly (EDIT: for py3status). At same time, we say we support py3status.conf
now too. Idk.
If we are to add options for XDG, I'd like them to be at the end of the list please |
I don't get this. Why do we not want
|
45140d7
to
3abbb86
Compare
Because py3status is an i3status wrapper so we first respect i3status' way of finding out its config, and then if we want to add ours, we can |
If our |
|
I'm not even sure I like the idea tbh. Our philosophy says : no added configuration file and yet you are proposing to create py3status.conf There is no need for that tbh |
My opinion is the following: if So, I'm fine with any choice that you make here 😉 |
Other thing is that if we support this, users don't have to do |
3abbb86
to
311cb6d
Compare
I also would like to have proper XDG_CONFIG_HOME paths. For all things that py3status add I can't simple take my py3status file and run it on i3status. The contrary is true, however the default paths as they current are make it impossible to have a different config file for py3status and i3status (unless of course passing |
this pr
what i think it should be.. after reviewing manuals, commits, etc.
this part custom. to say and support
but we have (xdg) correct |
311cb6d
to
566ba01
Compare
@ultrabug Can you review this? I remove a duplicate. I find i3/i3status making mistakes over there... and they fixed paths over there too... so I want to organize/paths correctly. If users have a stray config and are detected, then yes, it will use that... only because it's a stray config. Nothing is removed, but non-official paths would be tested after official paths... not before. You can review/test paths this with: diff --git a/py3status/argparsers.py b/py3status/argparsers.py
index 2f811f8..e323587 100644
--- a/py3status/argparsers.py
+++ b/py3status/argparsers.py
@@ -183,6 +183,15 @@ def parse_cli_args():
"{}/.i3/py3status".format(home_path),
]
+ print('---i3status config paths--------')
+ for x in i3status_config_file_candidates:
+ print(x)
+ print("")
+ print('---module paths--------')
+ for x in options.include_paths:
+ print(x)
+ parser.exit()
+
include_paths = []
for path in options.include_paths:
path = os.path.abspath(path) |
650ce9c
to
5174cbd
Compare
OK guys I agree with you, thanks for taking the time to convince me :) All I ask now is an updated documentation about this please |
I updated the docs |
This add
sensiblexdg config paths for py3status. Ref: #1584 (comment)