Last active
February 29, 2024 14:50
-
-
Save AlexMeuer/11c889461698e42065e268c2df7a4bd8 to your computer and use it in GitHub Desktop.
Open current meeting in zoom (from google calendar via gcalcli)
This file contains 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
gcalcli agenda (date) (date -v 23H -v 59M -v 59S) --details=location --tsv \ | |
| awk -v current_time=(date +%H:%M) -F '\t' '{if ($2 <= current_time && $4 > current_time && $6 != "") print $6}' \ | |
| head -n 1 \ | |
| xargs -I {} sh -c "open -a zoom.us {}" | |
# Escaped fish abbreviation that can be added to `~/config/fish/config.fish` | |
abbr -a -- zoomq gcalcli\ agenda\ \(date\)\ \(date\ \ -v\ 23H\ -v\ 59M\ -v\ 59S\)\ --details=location\ --tsv\ \|\ awk\ -v\ current_time=\(date +%H:%M\)\ -F\ \'\\t\'\ \'\{if\ \(\$2\ \<=\ current_time\ \&\&\ \$4\ \>\ current_time\ \&\&\ \$6\ !=\ \"\"\)\ print\ \$6\}\'\ \|\ head\ -n\ 1\ \|\ xargs\ -I\ \{\}\ sh\ -c\ \"open\ -a\ zoom.us\ \{\}\" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment