diff --git a/bumblebee/__init__.py b/bumblebee/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/bumblebee/outputs/__init__.py b/bumblebee/outputs/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/bumblebee/outputs/i3.py b/bumblebee/outputs/i3.py new file mode 100644 index 0000000..39c8e20 --- /dev/null +++ b/bumblebee/outputs/i3.py @@ -0,0 +1,13 @@ +import json + +class i3bar: + def preamble(self): + return json.dumps({ "version": 1 }) + "[" + + def data(self, data): + return json.dumps(data) + "," + + def finalize(self): + return "]" + +# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4 diff --git a/i3bumblebee b/i3bumblebee new file mode 100755 index 0000000..f798013 --- /dev/null +++ b/i3bumblebee @@ -0,0 +1,20 @@ +#!/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