[themes] Add non-powerline solarized-dark with awesome fonts

In order to do that, change the theme engine so that a theme can
override settings in the iconsets. Was probably a bug to begin with that
this was not possible.
This commit is contained in:
Tobias Witek 2017-09-20 08:59:23 +02:00
parent be8669270e
commit f3ee6e0c67
3 changed files with 47 additions and 3 deletions

View file

@ -33,9 +33,9 @@ class Theme(object):
def _init(self, data):
"""Initialize theme from data structure"""
self._theme = data
for iconset in data.get("icons", []):
self._merge(data, self._load_icons(iconset))
self._theme = data
self._defaults = data.get("defaults", {})
self._cycles = self._theme.get("cycle", [])
self.reset()
@ -174,7 +174,8 @@ class Theme(object):
if key in target and isinstance(target[key], dict):
self._merge(target[key], value)
else:
target[key] = copy.deepcopy(value)
if not key in target:
target[key] = copy.deepcopy(value)
return target
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4