Skip to content

Commit c43cffb

Browse files
author
Tony Crisci
committed
Add ipc_shutdown handler
1 parent a13ec8b commit c43cffb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

overrides/i3ipc.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88

99
class Connection(i3ipc.Connection):
1010
def main(self):
11-
MainLoop().run()
11+
main_loop = MainLoop()
12+
self.connect('ipc_shutdown', lambda self: main_loop.quit())
13+
main_loop.run()
1214

1315
Connection = override(Connection)
1416
__all__.append('Connection')

0 commit comments

Comments
 (0)