Closed hovnatan closed 5 years ago
Simple following script hangs without showing any window or workspace focus changes after the latest commits
#!/usr/bin/env python3 import sh import threading import i3ipc class FocusWatcher: def __init__(self): self.i3 = i3ipc.Connection() print("Connection to I3 established.") self.i3.on('window::focus', self.on_window_focus) self.i3.on("workspace::focus", self.on_workspace_focus) def on_workspace_focus(self, i3conn, event): print(f"hello ws") def on_window_focus(self, i3conn, event): window_id = event.container.props.id print(f"window focus on {window_id}") def launch_i3(self): print("i3 started") self.i3.main() def run(self): threads = [] threads.append(threading.Thread(target=self.launch_i3)) for t in threads: t.start() if __name__ == '__main__': focus_watcher = FocusWatcher() focus_watcher.run()
Simple following script hangs without showing any window or workspace focus changes after the latest commits