Skip to content

Instantly share code, notes, and snippets.

@AlexMeuer
Last active February 29, 2024 14:50
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 AlexMeuer/11c889461698e42065e268c2df7a4bd8 to your computer and use it in GitHub Desktop.
Save AlexMeuer/11c889461698e42065e268c2df7a4bd8 to your computer and use it in GitHub Desktop.
Open current meeting in zoom (from google calendar via gcalcli)
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