hammerspoon2-docs
    Preparing search index...

    Function forID

    • Get the window with the given ID

      This is much faster than searching allWindows() for the ID, because it only asks the application that owns the window for its windows. Like allWindows(), this can find minimized windows, windows of hidden applications, and windows in native fullscreen and on other Spaces, with the same limitation.

      Parameters

      • id: number

        The window's ID (see the id property on hs.window objects)

      Returns HSWindow | null

      The window, or null if there is no window with that ID