[core] Add theme to modules
This commit is contained in:
parent
f2d411276d
commit
28bdf4355b
2 changed files with 3 additions and 3 deletions
|
@ -54,8 +54,7 @@ def main():
|
||||||
input_thread.start()
|
input_thread.start()
|
||||||
|
|
||||||
for module in config.modules():
|
for module in config.modules():
|
||||||
modules.append(core.module.load(module, config))
|
modules.append(core.module.load(module, config, theme))
|
||||||
modules[-1].theme = theme # TODO: make this nice (ctor)
|
|
||||||
output.modules(modules)
|
output.modules(modules)
|
||||||
core.event.trigger('start')
|
core.event.trigger('start')
|
||||||
while True:
|
while True:
|
||||||
|
@ -65,7 +64,6 @@ def main():
|
||||||
core.event.trigger('stop')
|
core.event.trigger('stop')
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
|
||||||
try:
|
try:
|
||||||
main()
|
main()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|
|
@ -38,6 +38,8 @@ class Module(core.input.Object):
|
||||||
self.alias = self.__config.get('__alias__', None)
|
self.alias = self.__config.get('__alias__', None)
|
||||||
self.next_update = None
|
self.next_update = None
|
||||||
|
|
||||||
|
self.theme = theme
|
||||||
|
|
||||||
def parameter(self, key, default=None):
|
def parameter(self, key, default=None):
|
||||||
value = default
|
value = default
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue