[core/output] Move widget/module handling inside output
The core.output module now manages the list of modules and retrieves the widgets inside draw() itself. That way, details of drawing/updating widgets are not visible from the outside anymore.
This commit is contained in:
parent
96c7b762b2
commit
445c5a65f1
4 changed files with 52 additions and 11 deletions
|
@ -11,12 +11,12 @@ def main():
|
|||
modules = []
|
||||
for module in config.modules():
|
||||
modules.append(core.module.load(module))
|
||||
output.modules(modules)
|
||||
output.draw('start')
|
||||
while True:
|
||||
output.clear()
|
||||
for module in modules:
|
||||
module.update()
|
||||
output.append(module)
|
||||
output.draw('statusline')
|
||||
output.wait(config.interval())
|
||||
output.draw('stop')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue