hammerspoon2-docs
    Preparing search index...

    Function addWatcher

    • Add a watcher that is called whenever the pasteboard contents change. Multiple watchers may be registered; they are each called independently. Because macOS provides no pasteboard change notification API, this is implemented by polling changeCount at the interval specified by watcherInterval.

      Parameters

      • listener: (changeCount: number) => void

        A function called with the new changeCount integer whenever the pasteboard changes

      Returns void