Skip to content

Instantly share code, notes, and snippets.

@thomaspeitz
Created November 4, 2020 12:46
Show Gist options
  • Save thomaspeitz/c72c493140c0eec44d01254fe14fad6d to your computer and use it in GitHub Desktop.
Save thomaspeitz/c72c493140c0eec44d01254fe14fad6d to your computer and use it in GitHub Desktop.
Script to switch from terminal to google meet session
#!/bin/bash
# Just a slightly modified https://github.com/aezell/mutemeet/blob/master/MuteMeet.scpt - Thanks!
osascript <<'END'
tell application "Google Chrome"
activate
set i to 0
repeat with w in (windows) -- loop over each window
set j to 1 -- tabs are not zeroeth
repeat with t in (tabs of w) -- loop over each tab
if title of t starts with "Meet " then
set (active tab index of w) to j -- set Meet tab to active
set index of w to 1 -- set window with Meet tab to active
delay 0.5
do shell script "open -a Google\\ Chrome" -- these two lines are hackery to actually activate the window
return
end if
set j to j + 1
end repeat
set i to i + 1
end repeat
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment