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.
This commit is contained in:
Vincent Bernat 2021-07-06 14:53:15 +02:00
parent 1caacfd679
commit d4b25aa2da

View file

@ -196,6 +196,10 @@ if __name__ == "__main__":
# Create/display a quake console # Create/display a quake console
i3.on(Event.TICK, 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() i3.main()
except Exception as e: except Exception as e:
logger.exception("%s", e) logger.exception("%s", e)