[config] Allow parameter passing via commandline
Allow the user to specify arbitrary configuration parameters from the commandline and evaluate those in the modules (and elsewhere). Re-enable the CPU module as a first showcase of this functionality.
This commit is contained in:
parent
353c47d76e
commit
18d7e1befb
4 changed files with 29 additions and 12 deletions
|
@ -19,7 +19,7 @@ class Theme:
|
|||
self.begin()
|
||||
|
||||
def begin(self):
|
||||
self._config.parameter("theme.cycleidx", 0)
|
||||
self._config.set("theme.cycleidx", 0)
|
||||
self._cycle = self._cycles[0] if len(self._cycles) > 0 else {}
|
||||
self._background = [ None, None ]
|
||||
|
||||
|
@ -64,7 +64,7 @@ class Theme:
|
|||
return self._background[1]
|
||||
|
||||
def separator_block_width(self, widget):
|
||||
return 9
|
||||
return self._get(widget, "separator-block-width")
|
||||
|
||||
def _get(self, widget, name):
|
||||
module = widget.module()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue