diff --git a/bumblebee-status b/bumblebee-status index fe5229f..77ec60c 100755 --- a/bumblebee-status +++ b/bumblebee-status @@ -54,8 +54,7 @@ def main(): input_thread.start() for module in config.modules(): - modules.append(core.module.load(module, config)) - modules[-1].theme = theme # TODO: make this nice (ctor) + modules.append(core.module.load(module, config, theme)) output.modules(modules) core.event.trigger('start') while True: @@ -65,7 +64,6 @@ def main(): core.event.trigger('stop') if __name__ == "__main__": - main() try: main() except Exception as e: diff --git a/core/module.py b/core/module.py index 89cdbba..8784792 100644 --- a/core/module.py +++ b/core/module.py @@ -38,6 +38,8 @@ class Module(core.input.Object): self.alias = self.__config.get('__alias__', None) self.next_update = None + self.theme = theme + def parameter(self, key, default=None): value = default