[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

@ -38,6 +38,8 @@ class Module(bumblebee.engine.Module):
else:
self._state = "transition"
transition = " ".join(line.split(" ")[2:])
self._text = temp
if transition:
self._text = "{} {}".format(temp, transition)
def state(self, widget):

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,6 +174,7 @@ class Theme(object):
if key in target and isinstance(target[key], dict):
self._merge(target[key], value)
else:
if not key in target:
target[key] = copy.deepcopy(value)
return target

View file

@ -0,0 +1,41 @@
{
"icons": [ "awesome-fonts" ],
"defaults": {
"separator-block-width": 0,
"separator": "",
"warning": {
"fg": "#002b36",
"bg": "#b58900"
},
"critical": {
"fg": "#002b36",
"bg": "#dc322f"
}
},
"cycle": [
{ "fg": "#93a1a1", "bg": "#002b36" },
{ "fg": "#eee8d5", "bg": "#586e75" }
],
"dnf": {
"good": {
"fg": "#002b36",
"bg": "#859900"
}
},
"pacman": {
"good": {
"fg": "#002b36",
"bg": "#859900"
}
},
"battery": {
"charged": {
"fg": "#002b36",
"bg": "#859900"
},
"AC": {
"fg": "#002b36",
"bg": "#859900"
}
}
}