[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:
parent
be8669270e
commit
f3ee6e0c67
3 changed files with 47 additions and 3 deletions
|
@ -38,7 +38,9 @@ class Module(bumblebee.engine.Module):
|
|||
else:
|
||||
self._state = "transition"
|
||||
transition = " ".join(line.split(" ")[2:])
|
||||
self._text = "{} {}".format(temp, transition)
|
||||
self._text = temp
|
||||
if transition:
|
||||
self._text = "{} {}".format(temp, transition)
|
||||
|
||||
def state(self, widget):
|
||||
return self._state
|
||||
|
|
|
@ -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
|
||||
|
|
41
themes/solarized-dark-awesome.json
Normal file
41
themes/solarized-dark-awesome.json
Normal 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"
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue