445c5a65f1
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.
28 lines
633 B
Python
Executable file
28 lines
633 B
Python
Executable file
#!/usr/bin/env python
|
|
|
|
import sys
|
|
import core.config
|
|
import core.output
|
|
import core.module
|
|
|
|
def main():
|
|
config = core.config.Config(sys.argv[1:])
|
|
output = core.output.i3()
|
|
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.draw('statusline')
|
|
output.wait(config.interval())
|
|
output.draw('stop')
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|
|
|
|
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
|