Separate colorschemes by extension

Refs #45.
This commit is contained in:
Kim Silkebækken 2013-01-16 08:36:39 +01:00
parent 07771d7773
commit b7ff63ccc0
6 changed files with 5 additions and 5 deletions

View File

@ -73,7 +73,7 @@ Extension-specific configuration
Colorschemes
------------
:Location: :file:`powerline/colorschemes/{name}.json`
:Location: :file:`powerline/colorschemes/{extension}/{name}.json`
``name``
Name of the colorscheme.

View File

@ -13,15 +13,15 @@
},
"ext": {
"terminal": {
"colorscheme": "terminal_default",
"colorscheme": "default",
"theme": "default"
},
"tmux": {
"colorscheme": "tmux_default",
"colorscheme": "default",
"theme": "default"
},
"vim": {
"colorscheme": "vim_default",
"colorscheme": "default",
"theme": "default",
"local_themes": {
"help": "help"

View File

@ -24,7 +24,7 @@ class Powerline(object):
self.config_ext = config['ext'][ext]
# Load and initialize colorscheme
colorscheme_config = self._load_json_config(os.path.join('colorschemes', self.config_ext['colorscheme']))
colorscheme_config = self._load_json_config(os.path.join('colorschemes', ext, self.config_ext['colorscheme']))
colorscheme = Colorscheme(colorscheme_config)
# Load and initialize extension theme