bumblebee-status/bumblebee-status
Tobias Witek 8622673114 [core] Re-enable preliminary module loading (stubbed)
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
2020-01-19 15:36:52 +01:00

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