bumblebee-status/bumblebee-status
Tobias Witek a17cd4759c [core/output] Implement simple wait
To pace the output lines, implement a simple wait() call for the i3
output.
2020-01-26 13:31:20 +01:00

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