From 225e5a5a8b5c419677cbb9db5360c4d625b7cc5d Mon Sep 17 00:00:00 2001 From: lasers Date: Tue, 5 Feb 2019 16:05:11 -0600 Subject: [PATCH] add XDG_CONFIG_HOME for py3status, organize paths --- py3status/argparsers.py | 11 ++++++----- py3status/command.py | 4 ++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/py3status/argparsers.py b/py3status/argparsers.py index 41445d10f4..1d5d61feea 100644 --- a/py3status/argparsers.py +++ b/py3status/argparsers.py @@ -35,10 +35,11 @@ def parse_cli_args(): # i3status config file default detection # respect i3status' file detection order wrt issue #43 i3status_config_file_candidates = [ - "{}/.i3status.conf".format(home_path), + "{}/py3status/config".format(xdg_home_path), "{}/i3status/config".format(xdg_home_path), - "{}/.config/i3/i3status.conf".format(home_path), - "{}/.i3/i3status.conf".format(home_path), + "{}/i3/i3status.conf".format(xdg_home_path), # custom + "{}/.i3status.conf".format(home_path), + "{}/.i3/i3status.conf".format(home_path), # custom "{}/i3status/config".format(xdg_dirs_path), "/etc/i3status.conf", ] @@ -200,10 +201,10 @@ def _format_action_invocation(self, action): # make include path to search for user modules if None if not options.include_paths: options.include_paths = [ - "{}/.i3/py3status".format(home_path), - "{}/.config/i3/py3status".format(home_path), + "{}/py3status/modules".format(xdg_home_path), "{}/i3status/py3status".format(xdg_home_path), "{}/i3/py3status".format(xdg_home_path), + "{}/.i3/py3status".format(home_path), ] include_paths = [] diff --git a/py3status/command.py b/py3status/command.py index d5b449c1c6..a9e4c4586b 100644 --- a/py3status/command.py +++ b/py3status/command.py @@ -465,10 +465,10 @@ def parse_list_or_docstring(options, sps): home_path = os.path.expanduser("~") xdg_home_path = os.environ.get("XDG_CONFIG_HOME", "{}/.config".format(home_path)) options.include_paths = [ - "{}/.i3/py3status/".format(home_path), - "{}/.config/i3/py3status/".format(home_path), + "{}/py3status/modules".format(xdg_home_path), "{}/i3status/py3status".format(xdg_home_path), "{}/i3/py3status".format(xdg_home_path), + "{}/.i3/py3status".format(home_path), ] include_paths = [] for path in options.include_paths: