8622673114
Add logic for parsing commandline options, and a preliminary stub for loading modules. Note: The idea is that core.module.load() will return a valid, but empty, module that displays an error, if the module cannot be loaded
26 lines
668 B
Python
Executable file
26 lines
668 B
Python
Executable file
#!/usr/bin/env python
|
|
|
|
import sys
|
|
import core.config
|
|
import core.output
|
|
|
|
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))
|
|
sys.stdout.write(output.start())
|
|
while True:
|
|
sys.stdout.write(output.begin_status_line())
|
|
for module in modules:
|
|
module.update()
|
|
sys.stdout.write(output.draw(module))
|
|
sys.stdout.write(output.end_status_line())
|
|
sys.stdout.write(output.stop())
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|
|
|
|
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
|