Update default configuration

This commit is contained in:
Kim Silkebækken 2012-12-10 14:36:07 +01:00
parent 039526f720
commit 87d5db9af7
3 changed files with 26 additions and 15 deletions

20
powerline/config.json Normal file
View File

@ -0,0 +1,20 @@
{
"common": {
"dividers": {
"left": {
"hard": "⮀",
"soft": "⮁"
},
"right": {
"hard": "⮂",
"soft": "⮃"
}
}
},
"ext": {
"vim": {
"colorscheme": "default",
"theme": "default"
}
}
}

View File

@ -22,15 +22,17 @@ class Powerline(object):
sys.path[:0] = self.search_paths
# Load main config file, limited to the current extension
self.config = self._load_json_config('config')[ext]
# Load main config file
config = self._load_json_config('config')
self.config = config['common']
self.config_ext = config['ext'][ext]
# Load and initialize colorscheme
colorscheme_config = self._load_json_config(os.path.join('colorschemes', self.config['colorscheme']))
colorscheme_config = self._load_json_config(os.path.join('colorschemes', self.config_ext['colorscheme']))
self.colorscheme = Colorscheme(colorscheme_config)
# Load and initialize extension theme
theme_config = self._load_json_config(os.path.join('themes', ext, self.config['theme']))
theme_config = self._load_json_config(os.path.join('themes', ext, self.config_ext['theme']))
self.theme = Theme(ext, theme_config)
# Load and initialize extension renderer

View File

@ -8,17 +8,6 @@ class Renderer(object):
ATTR_ITALIC = 2
ATTR_UNDERLINE = 4
dividers = {
'l': {
'hard': u'',
'soft': u'',
},
'r': {
'hard': u'',
'soft': u'',
},
}
def __init__(self, colorscheme, theme):
pass