mirror of
https://github.com/powerline/powerline.git
synced 2025-07-24 22:36:01 +02:00
Add XDG_CONFIG_DIRS to config_paths for system-wide install
Commonly this will be `/etc/xdg/powerline`
This commit is contained in:
parent
8e8e9c9edc
commit
b31c987cc8
@ -78,8 +78,13 @@ class Powerline(object):
|
||||
'''
|
||||
config_home = os.environ.get('XDG_CONFIG_HOME', os.path.join(os.path.expanduser('~'), '.config'))
|
||||
config_path = os.path.join(config_home, 'powerline')
|
||||
config_paths = [config_path]
|
||||
config_dirs = os.environ.get('XDG_CONFIG_DIRS', None)
|
||||
if config_dirs is not None:
|
||||
config_paths.extend([os.path.join(d, 'powerline') for d in config_dirs.split(':')])
|
||||
plugin_path = os.path.join(os.path.realpath(os.path.dirname(__file__)), 'config_files')
|
||||
return [config_path, plugin_path]
|
||||
config_paths.append(plugin_path)
|
||||
return config_paths
|
||||
|
||||
def load_theme_config(self, name):
|
||||
'''Get theme configuration.
|
||||
|
Loading…
x
Reference in New Issue
Block a user