Skip to content

Instantly share code, notes, and snippets.

@taftsanders
Forked from streetturtle/start-a-meeting
Created August 10, 2022 21:10
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 taftsanders/91e365e93c0ebf41e072fed00805c59c to your computer and use it in GitHub Desktop.
Save taftsanders/91e365e93c0ebf41e072fed00805c59c to your computer and use it in GitHub Desktop.
Script to start a Google Meet meeting in a default browser and copy the link to the meeting to the clipboard
#!/bin/bash
# Script to start a new Google Meet meeting and copy the link to the clipboard. Supports Google Chrome and Firefox
#
# Prerequisite
# - xclip
# - browser extension to display url of the currently opened page in the window's title
# - Chrome: https://chrome.google.com/webstore/detail/url-in-title/ignpacbgnbnkaiooknalneoeladjnfgb
# In Extension's Options set following:
# - Tab title format: {title} - {protocol}://{hostname}{port}/{path}
# - Page URL filtering: Whitelist
# - URL filters: ^https://meet\.google\.com/
# - Firefox: https://addons.mozilla.org/en-US/firefox/addon/add-url-to-window-title/
# Open a new meeting
xdg-open https://meet.google.com/new
# Wait till it creates a new 'room'
sleep 2
# Get the url to the meeting
xwininfo -tree -root | grep -oE 'https://[^ ]+' | xclip -selection clipboard
# Notify when done
notify-send 'Google Meet' 'Link to the meeting copied to the clipboard'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment