xdotool search --name "Zoom Meeting ID:"
This will exit non-zero if no meeting matching this name is found. "Zoom Meeting ID:"
This window exists regardless of sharing or not sharing, in my tests.
While in a zoom, do some thing. WHen not in zoom, do something else.
while true; do
# search --sync waits for the window to show up.
if xdotool search --sync --name "Zoom Meeting ID:" > /dev/null; then
echo "In zoom :)"
else
echo "No zoom"
fi
sleep 1
done
A window named "as_toolbar" will appear (this is the "stop share" tool bar window when sharing your screen)
pid=$(xdotool search --sync --name "Zoom Meeting ID:" getwindowpid); xdotool search --all --pid $pid --name as_toolbar