hammerspoon2-docs
    Preparing search index...

    Function addWatcher

    • Register a listener for serial port connection and disconnection events. The listener is called with two arguments: the event type string ("added" or "removed") and a port-info object with name and path fields.

      Parameters

      • listener: (event: string, port: { name: string; path: string }) => void

        The function to call when a serial port is added or removed

      Returns void