diff options
author | dakkar <dakkar@thenautilus.net> | 2021-02-19 20:01:24 +0000 |
---|---|---|
committer | dakkar <dakkar@thenautilus.net> | 2021-02-19 20:02:06 +0000 |
commit | e1775f399cfd53357d12db1dc25124b30ebf06df (patch) | |
tree | e5da76f93697d2d746f65b2e8dedf3e625dd75e6 | |
parent | allow set-screen explicit set (diff) | |
download | misc-scripts-e1775f399cfd53357d12db1dc25124b30ebf06df.tar.gz misc-scripts-e1775f399cfd53357d12db1dc25124b30ebf06df.tar.bz2 misc-scripts-e1775f399cfd53357d12db1dc25124b30ebf06df.zip |
zoom wrapper
-rwxr-xr-x | bin/zoom | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/bin/zoom b/bin/zoom new file mode 100755 index 0000000..fcdcb6e --- /dev/null +++ b/bin/zoom @@ -0,0 +1,30 @@ +#!/bin/bash + +# convert https://us02web.zoom.us/j/1111111?pwd=xxxxxxxx (the URI you +# usually get) +# +# into zoommtg://zoom.us/join?confno=1111111&pwd=xxxxxxxx (the URI +# that the zoom client actually wants) + +munge-zoom-uri() { + local uri="$1" + if [[ $uri =~ ^zoommtg://[^/]+/join ]]; then + echo "$uri" + return + fi + + if [[ $uri =~ ^https?://([^/.]+\.)?zoom\.us/j/([0-9]+)\?pwd=(.+)$ ]]; then + echo "zoommtg://zoom.us/join?confno=${BASH_REMATCH[2]}&pwd=${BASH_REMATCH[3]}" + return + fi + + >&2 echo "can't parse <$uri>, ignoring"; + return +} + +declare -a args +if [[ -n "$1" ]]; then + args+=("$(munge-zoom-uri "$1")") +fi + +exec /opt/zoom/ZoomLauncher "${args[@]}" |