diff --git a/powerline/__init__.py b/powerline/__init__.py index 1f7b71cc..bc023f61 100644 --- a/powerline/__init__.py +++ b/powerline/__init__.py @@ -8,13 +8,11 @@ import logging from powerline.colorscheme import Colorscheme from powerline.lib.config import ConfigLoader from powerline.lib.unicode import safe_unicode, FailedUnicode +from powerline.config import DEFAULT_SYSTEM_CONFIG_DIR from threading import Lock, Event -DEFAULT_SYSTEM_CONFIG_DIR = None - - def find_config_file(search_paths, config_file): config_file += '.json' for path in search_paths: diff --git a/powerline/bindings/config.py b/powerline/bindings/config.py index ab21d035..16722a98 100644 --- a/powerline/bindings/config.py +++ b/powerline/bindings/config.py @@ -7,11 +7,11 @@ import os import subprocess import re +from powerline.config import TMUX_CONFIG_DIRECTORY + TmuxVersionInfo = namedtuple('TmuxVersionInfo', ('major', 'minor', 'suffix')) -TMUX_CONFIG_DIRECTORY = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'tmux') - def get_tmux_executable_name(): '''Returns tmux executable name diff --git a/powerline/config.py b/powerline/config.py new file mode 100644 index 00000000..53e530f4 --- /dev/null +++ b/powerline/config.py @@ -0,0 +1,8 @@ +# vim:fileencoding=utf-8:noet + +from __future__ import absolute_import, unicode_literals, print_function +import os + +BINDINGS_DIRECTORY = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'bindings') +TMUX_CONFIG_DIRECTORY = os.path.join(BINDINGS_DIRECTORY, 'tmux') +DEFAULT_SYSTEM_CONFIG_DIR = None