Created
September 25, 2020 17:42
-
-
Save r2dev2/ab47be1f5977caa59990a7c568cdf7ce to your computer and use it in GitHub Desktop.
This is my bash script for WSL2 for retrieving saved zoom links from a json. It opens the zoom link in firefox.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
hjelp=" | |
Zoom link helper program\n | |
\n | |
Usage:\n | |
\t./zoomselector.bash class\n | |
\n | |
Subcommands:\n | |
\tinit:\n | |
\t\tInstalls dependencies\n | |
\tprint:\n | |
\t\tPrints all zoom classes\n | |
" | |
case $1 in | |
print) | |
cat ~/zooms.json | jq | |
;; | |
init) | |
echo Installing jq | |
sudo apt install jq | |
echo Please fill out ~/zooms.json with class: zoom link | |
;; | |
"") | |
echo Please provide a first argument, see --help | |
;; | |
-h|--help|help) | |
echo $hjelp | sed 's/\\n/\n/g' | sed 's/\\t/\t/g' | |
;; | |
*) | |
url=$(jq .$1 ~/zooms.json | sed 's/"//g') | |
printf "\033[1;35m%s\033[0m\n" $url | |
printf $url | powershell.exe -c clip | |
powershell.exe -c "& \"C:\\Program Files\\Mozilla Firefox\\firefox.exe\" $url" | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment