hammerspoon2-docs
    Preparing search index...

    Function once

    • Register a listener that fires at most once for a system-level audio configuration event.

      Parameters

      • event: "dOut" | "dIn" | "dSErr" | "dev+" | "dev-"

        The event to listen for

      • listener: () => void

        Called the next time a matching event occurs, then automatically removed

      Returns void

      Throws an Error on failure; wrap calls in try/catch to handle it.