[input] Terminate i3 protocol header with newline

According to https://i3wm.org/docs/i3bar-protocol.html, the header block
needs to be terminated by a newline.

fixes #76
This commit is contained in:
Tobias Witek 2017-04-26 07:37:47 +02:00
parent fc516102b8
commit 02f3559734

View file

@ -79,7 +79,7 @@ class I3BarOutput(object):
def start(self): def start(self):
"""Print start preamble for i3bar protocol""" """Print start preamble for i3bar protocol"""
self._started = True self._started = True
sys.stdout.write(json.dumps({"version": 1, "click_events": True}) + "[\n") sys.stdout.write(json.dumps({"version": 1, "click_events": True}) + "\n[\n")
def stop(self): def stop(self):
"""Finish i3bar protocol""" """Finish i3bar protocol"""