From d4b25aa2dac0050306dedb48bc791a22512889f6 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Tue, 6 Jul 2021 14:53:15 +0200 Subject: [PATCH] i3-companion: log output events This will be useful when trying to debug output changes. I need to know what I need to restart. Awesome was restarted while i3 does not. On top of my head, I need to reload xsettingsd.service and start wallpaper.service. --- bin/i3-companion | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/i3-companion b/bin/i3-companion index 2352053..ff9c78a 100755 --- a/bin/i3-companion +++ b/bin/i3-companion @@ -196,6 +196,10 @@ if __name__ == "__main__": # Create/display a quake console i3.on(Event.TICK, quake_console) + # Log output event + i3.on(Event.OUTPUT, + lambda _, event: logger.info(f"Output event: {event.ipc_data}")) + i3.main() except Exception as e: logger.exception("%s", e)