mirror of
https://github.com/powerline/powerline.git
synced 2025-07-23 13:55:45 +02:00
Simplify retrieving of config home in core init method
This commit is contained in:
parent
203a32e778
commit
f552979125
@ -11,10 +11,7 @@ from theme import Theme
|
|||||||
|
|
||||||
class Powerline(object):
|
class Powerline(object):
|
||||||
def __init__(self, ext):
|
def __init__(self, ext):
|
||||||
try:
|
config_home = os.environ.get('XDG_CONFIG_HOME', os.path.expanduser('~/.config'))
|
||||||
config_home = os.environ['XDG_CONFIG_HOME']
|
|
||||||
except KeyError:
|
|
||||||
config_home = os.path.expanduser('~/.config')
|
|
||||||
|
|
||||||
config_path = os.path.join(config_home, 'powerline')
|
config_path = os.path.join(config_home, 'powerline')
|
||||||
plugin_path = os.path.realpath(os.path.dirname(__file__))
|
plugin_path = os.path.realpath(os.path.dirname(__file__))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user