From 4716481087ac3745aa66e39787447b4250daaa84 Mon Sep 17 00:00:00 2001 From: Tobias Witek Date: Wed, 17 Jan 2018 18:56:12 +0100 Subject: [PATCH] [core/theme] Small bugfix (widget needs to have linked module) This is mainly for the autotests --- README.md | 8 ++++++++ bumblebee/theme.py | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 15b0d74..edbe7f4 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,14 @@ $ ./bumblebee-status -l modules Any parameter you can specify with `-p =`, 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 .theme.= +# 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: ``` $ cat ~/.bumblebee-status.conf diff --git a/bumblebee/theme.py b/bumblebee/theme.py index 92f4786..7fa8f65 100644 --- a/bumblebee/theme.py +++ b/bumblebee/theme.py @@ -233,7 +233,8 @@ class Theme(object): widget.set(key, (idx + 1) % len(value)) value = value[idx] - value = widget.get_module().parameter("theme.{}".format(name), value) + if widget.get_module() is not None: + value = widget.get_module().parameter("theme.{}".format(name), value) if isinstance(value, list) or isinstance(value, dict): return value