[core/theme] Add per-module theme override
Allow users to override theme values via parameter, such as: bumblebee-status -m spacer -p spacer.theme.bg=#ff0000 for a red spacer. see #223
This commit is contained in:
parent
323c1df6cc
commit
9f77514a1c
1 changed files with 2 additions and 0 deletions
|
@ -233,6 +233,8 @@ class Theme(object):
|
||||||
widget.set(key, (idx + 1) % len(value))
|
widget.set(key, (idx + 1) % len(value))
|
||||||
value = value[idx]
|
value = value[idx]
|
||||||
|
|
||||||
|
value = widget.get_module().parameter("theme.{}".format(name), value)
|
||||||
|
|
||||||
if isinstance(value, list) or isinstance(value, dict):
|
if isinstance(value, list) or isinstance(value, dict):
|
||||||
return value
|
return value
|
||||||
return self._colorset.get(value, value)
|
return self._colorset.get(value, value)
|
||||||
|
|
Loading…
Reference in a new issue