Move all variables that should be replaced to powerline/config.py

This commit is contained in:
ZyX 2014-06-28 19:20:06 +04:00
parent 95a2bef8d9
commit 27003bc003
3 changed files with 11 additions and 5 deletions

View File

@ -8,13 +8,11 @@ import logging
from powerline.colorscheme import Colorscheme from powerline.colorscheme import Colorscheme
from powerline.lib.config import ConfigLoader from powerline.lib.config import ConfigLoader
from powerline.lib.unicode import safe_unicode, FailedUnicode from powerline.lib.unicode import safe_unicode, FailedUnicode
from powerline.config import DEFAULT_SYSTEM_CONFIG_DIR
from threading import Lock, Event from threading import Lock, Event
DEFAULT_SYSTEM_CONFIG_DIR = None
def find_config_file(search_paths, config_file): def find_config_file(search_paths, config_file):
config_file += '.json' config_file += '.json'
for path in search_paths: for path in search_paths:

View File

@ -7,11 +7,11 @@ import os
import subprocess import subprocess
import re import re
from powerline.config import TMUX_CONFIG_DIRECTORY
TmuxVersionInfo = namedtuple('TmuxVersionInfo', ('major', 'minor', 'suffix')) 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(): def get_tmux_executable_name():
'''Returns tmux executable name '''Returns tmux executable name

8
powerline/config.py Normal file
View File

@ -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