[core/theme] Small bugfix (widget needs to have linked module)
This is mainly for the autotests
This commit is contained in:
parent
9f77514a1c
commit
4716481087
2 changed files with 10 additions and 1 deletions
|
@ -61,6 +61,14 @@ $ ./bumblebee-status -l modules
|
||||||
|
|
||||||
Any parameter you can specify with `-p <name>=<value>`, you can alternatively specify in `~/.bumblebee-status.conf` or `~/.config/bumblebee-status.conf`. This parameters act as a **fallback**, so values specified with `-p` have priority.
|
Any parameter you can specify with `-p <name>=<value>`, you can alternatively specify in `~/.bumblebee-status.conf` or `~/.config/bumblebee-status.conf`. This parameters act as a **fallback**, so values specified with `-p` have priority.
|
||||||
|
|
||||||
|
Parameters can also be used to override theme settings, such as:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ ./bumblebee-status -p <module>.theme.<theme field>=<value>
|
||||||
|
# for example, to get a spacer with a red background:
|
||||||
|
$ ./bumblebee-status -m spacer -p spacer.theme.bg=#ff0000
|
||||||
|
```
|
||||||
|
|
||||||
Configuration files have a format like this:
|
Configuration files have a format like this:
|
||||||
```
|
```
|
||||||
$ cat ~/.bumblebee-status.conf
|
$ cat ~/.bumblebee-status.conf
|
||||||
|
|
|
@ -233,6 +233,7 @@ class Theme(object):
|
||||||
widget.set(key, (idx + 1) % len(value))
|
widget.set(key, (idx + 1) % len(value))
|
||||||
value = value[idx]
|
value = value[idx]
|
||||||
|
|
||||||
|
if widget.get_module() is not None:
|
||||||
value = widget.get_module().parameter("theme.{}".format(name), value)
|
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):
|
||||||
|
|
Loading…
Reference in a new issue