From 9f77514a1c1ea7d8fe81a70a33ea77d9f137d630 Mon Sep 17 00:00:00 2001 From: Tobias Witek Date: Wed, 17 Jan 2018 18:49:09 +0100 Subject: [PATCH] [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 --- bumblebee/theme.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bumblebee/theme.py b/bumblebee/theme.py index 6a81fb3..92f4786 100644 --- a/bumblebee/theme.py +++ b/bumblebee/theme.py @@ -233,6 +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 isinstance(value, list) or isinstance(value, dict): return value return self._colorset.get(value, value)