From 07e2364f7897600cd16a52212fbe4b7af5fb31b3 Mon Sep 17 00:00:00 2001 From: tobi-wan-kenobi Date: Sat, 26 Nov 2022 10:11:51 +0100 Subject: [PATCH] [main] fix i3 protocol buf on error messages ("could not parse JSON") Errors during startup currently cause bumblebee-status to mistakenly output the first line of output (the "version" line) of the i3 protocol twice, causing an error message that says "could not parse JSON") see #940 --- bumblebee-status | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bumblebee-status b/bumblebee-status index 4a9f7fb..74d2afe 100755 --- a/bumblebee-status +++ b/bumblebee-status @@ -100,6 +100,7 @@ def main(): core.input.register(None, core.input.WHEEL_DOWN, "i3-msg workspace next_on_output") core.event.trigger("start") + started = True update_lock = threading.Lock() event_thread = threading.Thread(target=handle_events, args=(config, update_lock, )) @@ -131,7 +132,6 @@ def main(): if util.format.asbool(config.get("engine.collapsible", True)) == True: core.input.register(None, core.input.MIDDLE_MOUSE, output.toggle_minimize) - started = True signal.signal(10, sig_USR1_handler) while True: if update_lock.acquire(blocking=False) == True: