Skip to content

Comment on A year with the Elgato Stream Deckparent

Comments

Could you share that script?

Hopefully I get this right with the formatting.

    #!/bin/sh
    ZOOM=$(xdotool search --limit 1 --name "Zoom Meeting")
    ZOOM_WEBINAR=$(xdotool search --limit 1 --name "Zoom Webinar")
    
    if [ -z "${ZOOM}" ]; then
        xdotool windowactivate --sync "${ZOOM_WEBINAR}"
    elif [ -z "${ZOOM_WEBINAR}" ]; then
        xdotool windowactivate --sync "${ZOOM}"
    fi
    
    sleep 0.1
    xdotool key --clearmodifiers "alt+a"

Would it work for Mac?

It relies on xdotool, which I don't think works on Mac?

If I was still on mac, I'd probably try and use hammerspoon somehow. I used that for a few bits of automation, and I know it had ways to choose applications.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.