You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FWIW this sort of loop seems to work most reliably:
xdo id -m -N "Antstream Arcade"# wait for the a client with the window opts to appear# loop waiting for the id to no longer be inspectable, trying to close the window repeatedlywhile xdo id -N "Antstream Arcade"> /dev/null;do
xdo close -N "Antstream Arcade"done
We need to do this because there isn't really a command which blocks until the window is painted/mapped in xdo as it stands, at which point we then would grab a time measurement and close the window. xdo kill -m ... just kills the client immediately before anything is drawn or painted which skews the measurement to be smaller than it should be in reality, while xdo close ... simply submits a "close request" or some sort of thing which can be sent successfully so xdo returns exit code 0 but the application can be in a state where that close request does nothing and is effectively ignored. So we need to keep sending the close request until the window stops appearing in which case we know it showed up and was closed.
@bboozzoo mentioned there may be a better way if we patched xdo to have a call to xcb_get_geometry() that we could use (or maybe we could just do the call directly from etrace via cgo) but needs some investigation
xdotool is unmaintained and doesn't work with XWayland on Wayland as per @bboozzoo
Suggestion was to investigate xdo instead: https://github.com/baskerville/xdo
The text was updated successfully, but these errors were encountered: