Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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'
@streetturtle

This comment has been minimized.

Copy link
Owner Author

@streetturtle streetturtle commented Oct 1, 2020

In case you have multiple users signed in to the Google account and you want to create a meeting not from the default account, change the link to the meeting, it should be like this https://meet.google.com/new?authuser=1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.