a17cd4759c
To pace the output lines, implement a simple wait() call for the i3 output.
27 lines
707 B
Python
Executable file
27 lines
707 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())
|
|
output.wait(config.interval())
|
|
sys.stdout.write(output.stop())
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|
|
|
|
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
|