I'm running Ubuntu 20.04.5 LTS with the XFCE4 window manager.
I'm looking for a way for a shell script to be fired off when a particular X Window has been closed.
I know that I can create a program to run wmctrl or xdotool over and over again in a loop that checks for the existence of the X Window in question, and then executes a shell script when the presence of that X Window is no longer detected.
But I'm wondering whether there might be some sort of event-based utility that I can run which can do some or all of this for me, instead of my having to write this busy-wait-based program.
Any suggestions?
Thank you in advance.