mirror of
https://github.com/powerline/powerline.git
synced 2025-07-23 13:55:45 +02:00
Move configuration to /etc/xdg/powerline
XDG_CONFIG_DIRS is set in /etc/env.d by configuration from xdg-utils package, but it is not guaranteed to be present in the system
This commit is contained in:
parent
e151b600b2
commit
cc1c982696
@ -1 +1 @@
|
|||||||
EBUILD powerline-9999.ebuild 3916 SHA256 754f8750aa5c6a455871d44c9478b81278b71318e591a13ef30f763ddb1fbda5 SHA512 48dd9d3ac737417b6a072397a4a50fefc04c0cb4a3c6249b5bf11ee201986f7b25a94b83e6901e8099ae3ea733dc0e650f5ce2234b5143bdbafd906af56916e7 WHIRLPOOL 803298b97adaeb2e3a6cd31c4bd12897373d7ce0722df22a991c684ecd5146fcd87addfc6e428374d924d6cb950dee6bbcf2ea0a262904cc4d04e3eac0b2dcb8
|
EBUILD powerline-9999.ebuild 4091 SHA256 d1d13b09e3ebefdaa1b90c50ccceb563bb444ca0f484e6448a993d2612dfbb78 SHA512 47f211249bb85608cb9c5b8e72daba5c36971e294e27843396cbf517bc792db64a4f80e843f5c883f8411ed4c9cef5618f9d617b305303a31a4590636879dcd3 WHIRLPOOL 2fc50e1da46d56d160140d3a87a4d9421bf63d67c792bfd88486e0dc72d379045ed79d152aa060a014e7f6bf4eb232642463014de9523909946bd8b2cbf83371
|
||||||
|
@ -130,6 +130,10 @@ src_install() {
|
|||||||
fi
|
fi
|
||||||
rm powerline/bindings/bash/powerline.sh
|
rm powerline/bindings/bash/powerline.sh
|
||||||
elog ""
|
elog ""
|
||||||
|
insinto /etc/xdg/powerline
|
||||||
|
doins -r powerline/config_files/*
|
||||||
|
rm -r powerline/config_files
|
||||||
|
sed -i -e "/DEFAULT_SYSTEM_CONFIG_DIR/ s@None@'/etc/xdg'@" powerline/__init__.py
|
||||||
distutils-r1_src_install
|
distutils-r1_src_install
|
||||||
use doc && dohtml -r docs_output/*
|
use doc && dohtml -r docs_output/*
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,9 @@ import sys
|
|||||||
from powerline.colorscheme import Colorscheme
|
from powerline.colorscheme import Colorscheme
|
||||||
|
|
||||||
|
|
||||||
|
DEFAULT_SYSTEM_CONFIG_DIR = None
|
||||||
|
|
||||||
|
|
||||||
def open_file(path):
|
def open_file(path):
|
||||||
return open(path, 'r')
|
return open(path, 'r')
|
||||||
|
|
||||||
@ -86,7 +89,7 @@ class Powerline(object):
|
|||||||
config_home = os.environ.get('XDG_CONFIG_HOME', os.path.join(os.path.expanduser('~'), '.config'))
|
config_home = os.environ.get('XDG_CONFIG_HOME', os.path.join(os.path.expanduser('~'), '.config'))
|
||||||
config_path = os.path.join(config_home, 'powerline')
|
config_path = os.path.join(config_home, 'powerline')
|
||||||
config_paths = [config_path]
|
config_paths = [config_path]
|
||||||
config_dirs = os.environ.get('XDG_CONFIG_DIRS', None)
|
config_dirs = os.environ.get('XDG_CONFIG_DIRS', DEFAULT_SYSTEM_CONFIG_DIR)
|
||||||
if config_dirs is not None:
|
if config_dirs is not None:
|
||||||
config_paths.extend([os.path.join(d, 'powerline') for d in config_dirs.split(':')])
|
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')
|
plugin_path = os.path.join(os.path.realpath(os.path.dirname(__file__)), 'config_files')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user