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 Colorschemes
------------ ------------
:Location: :file:`powerline/colorschemes/{name}.json` :Location: :file:`powerline/colorschemes/{extension}/{name}.json`
``name`` ``name``
Name of the colorscheme. Name of the colorscheme.

View File

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

View File

@ -24,7 +24,7 @@ class Powerline(object):
self.config_ext = config['ext'][ext] self.config_ext = config['ext'][ext]
# Load and initialize colorscheme # 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) colorscheme = Colorscheme(colorscheme_config)
# Load and initialize extension theme # Load and initialize extension theme