Adjust to newest i3bar patch

This commit is contained in:
enkore 2013-03-21 12:35:28 +01:00
parent 8dd88a6180
commit c41c2736bf
2 changed files with 4 additions and 5 deletions

View File

@ -29,10 +29,9 @@ class Status:
def run_command_endpoint(self): def run_command_endpoint(self):
for command in io.JSONIO(io=io.IOHandler(sys.stdin, open(os.devnull,"w")), skiplines=1).read(): for command in io.JSONIO(io=io.IOHandler(sys.stdin, open(os.devnull,"w")), skiplines=1).read():
if command["command"] == "block_clicked": module = self.modules.get_by_id(command["instance"])
module = self.modules.get_by_id(command["instance"]) if module:
if module: module.on_click(command["button"])
module.on_click(command["button"])
def call_start_hooks(self): def call_start_hooks(self):
for hook in START_HOOKS: for hook in START_HOOKS:

View File

@ -51,7 +51,7 @@ class StandaloneIO(IOHandler):
""" """
n = -1 n = -1
proto = ('{"version":1,"bidirectional":true}', "[", "[]", ",[]",) proto = ('{"version":1,"click_events":true}', "[", "[]", ",[]",)
def __init__(self, interval=1): def __init__(self, interval=1):
super().__init__() super().__init__()