Skip to content

Instantly share code, notes, and snippets.

@UtahDave
Forked from jordansissel/zoom.md
Created December 17, 2020 21:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save UtahDave/2bb74a4cf0f16d4cde48661f4a817b73 to your computer and use it in GitHub Desktop.
Save UtahDave/2bb74a4cf0f16d4cde48661f4a817b73 to your computer and use it in GitHub Desktop.
Zoom on Linux notes

In a zoom?

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.

Zooming event

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

Am I sharing?

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment