hammerspoon2-docs
    Preparing search index...

    Function once

    • Register a listener that fires at most once for the given hs.power event.

      Parameters

      • event: HSPowerEvent

        The event to listen for

      • listener: () => void

        Called once, then automatically removed

      Returns void

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