c4683f3700
Prepare a framework for having modular outputs. Essentially, the main application uses a output-type object to format strings for the preamble, the actual data items, and a "postamble" (finalizer). The printing of that representation, again, is up to the main application, not the output framework. Probably, at some point in the future, an interface class will be in order, but right now, I want to keep it lean - seeing as for the forseeable future, i3bar is going to be the one and only consumer of this.
20 lines
368 B
Python
Executable file
20 lines
368 B
Python
Executable file
#!/usr/bin/env python
|
|
|
|
import bumblebee.outputs.i3
|
|
|
|
def main():
|
|
output = bumblebee.outputs.i3.i3bar()
|
|
|
|
print output.preamble()
|
|
|
|
while True:
|
|
# TODO: retrieve data from modules
|
|
data = []
|
|
print output.data(data)
|
|
|
|
print output.finalize()
|
|
|
|
if __name__ == "__main__":
|
|
main()
|
|
|
|
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
|