diff --git a/README.md b/README.md index e7b426e3..c88b0ada 100644 --- a/README.md +++ b/README.md @@ -151,7 +151,8 @@ alias precmd 'set prompt="`powerline-shell --shell tcsh $?`"' ### Config File Powerline-shell is customizable through the use of a config file. This file is -expected to be located at `~/.powerline-shell.json`. You can generate the +expected to be located at `~/.powerline-shell.json` or +`$XDG_CONFIG_HOME/powerline-shell/config.json`. You can generate the default config at this location using: ``` diff --git a/powerline_shell/__init__.py b/powerline_shell/__init__.py index 53eed96a..db9f7125 100644 --- a/powerline_shell/__init__.py +++ b/powerline_shell/__init__.py @@ -134,6 +134,7 @@ def find_config(): for location in [ "powerline-shell.json", "~/.powerline-shell.json", + os.path.join(os.environ.get("XDG_CONFIG_HOME", "~/.config"), "powerline-shell", "config.json"), ]: full = os.path.expanduser(location) if os.path.exists(full):