Created
April 15, 2026 22:11
-
-
Save jamesvrt/8a7d6c0fe5b83a8e230b3133363c2558 to your computer and use it in GitHub Desktop.
Auto-record Zoom calls with Minutes (Linux/PipeWire)
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
| #!/usr/bin/env bash | |
| # zoom-minutes — auto-start/stop Minutes recording when Zoom calls begin/end | |
| # | |
| # Detects Zoom calls by watching for "ZOOM VoiceEngine" audio streams in | |
| # PipeWire/PulseAudio. When a call starts, runs `minutes record`. When the | |
| # call ends, runs `minutes stop` to process the recording. | |
| # | |
| # Requirements: | |
| # - minutes CLI (https://github.com/silverstein/minutes) | |
| # - PipeWire or PulseAudio (pactl) | |
| # - Zoom desktop client (Linux) | |
| # | |
| # Install: | |
| # | |
| # curl -fsSL <gist-raw-url> -o ~/.local/bin/zoom-minutes | |
| # chmod +x ~/.local/bin/zoom-minutes | |
| # | |
| # Run manually: | |
| # | |
| # zoom-minutes | |
| # | |
| # Run on login (systemd user service): | |
| # | |
| # cat > ~/.config/systemd/user/zoom-minutes.service << 'EOF' | |
| # [Unit] | |
| # Description=Auto-record Zoom calls with Minutes | |
| # After=pipewire-pulse.service | |
| # | |
| # [Service] | |
| # ExecStart=%h/.local/bin/zoom-minutes | |
| # Restart=on-failure | |
| # RestartSec=10 | |
| # | |
| # [Install] | |
| # WantedBy=default.target | |
| # EOF | |
| # | |
| # systemctl --user daemon-reload | |
| # systemctl --user enable --now zoom-minutes.service | |
| # | |
| # Logs: | |
| # | |
| # journalctl --user -u zoom-minutes -f | |
| POLL_INTERVAL=5 | |
| IN_CALL=false | |
| log() { echo "[$(date '+%H:%M:%S')] $*"; } | |
| zoom_in_call() { | |
| pactl list source-outputs 2>/dev/null | grep -q "ZOOM VoiceEngine" | |
| } | |
| cleanup() { | |
| if $IN_CALL; then | |
| log "Shutting down — stopping recording" | |
| minutes stop | |
| fi | |
| exit 0 | |
| } | |
| trap cleanup SIGINT SIGTERM | |
| log "Watching for Zoom calls (poll every ${POLL_INTERVAL}s)..." | |
| while true; do | |
| if zoom_in_call; then | |
| if ! $IN_CALL; then | |
| log "Zoom call detected — starting recording" | |
| minutes record & | |
| RECORD_PID=$! | |
| IN_CALL=true | |
| fi | |
| else | |
| if $IN_CALL; then | |
| log "Zoom call ended — stopping recording" | |
| minutes stop | |
| IN_CALL=false | |
| fi | |
| fi | |
| sleep "$POLL_INTERVAL" | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment