hammerspoon2-docs
    Preparing search index...

    Function once

    • Register a listener that fires at most once, the next time a screen event happens. See on() for the events.

      Parameters

      • event: "change" | "spaceChange"

        The event to listen for

      • listener: (
            change?: { from: HSSpace | null; screen: HSScreen | null; to: HSSpace },
        ) => void

        Called once, then automatically removed

      Returns void

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