Applications

Interact with and track external applications running on the host system.

This module must be enabled under "Plugins" in the Deskifier Dashboard

Methods

Bring External Application To Top

Brings an external application to the top and sets it as the focus.

await window.deskifier.applications.bringToTop({ arguments })

Arguments

  • id Number (Required)
    The ID of the application

Returns

  • success Boolean
    If the action was successful.
  • message String
    Additional confirmation, or error details if action was unsuccessful.

Restore External Application

Restores an external application from a hidden state.

await window.deskifier.applications.restore({ arguments })

Arguments

  • id Number (Required)
    The ID of the application

Returns

  • success Boolean
    If the action was successful.
  • message String
    Additional confirmation, or error details if action was unsuccessful.

Minimize External Application

Hides an external application's window.

await window.deskifier.applications.minimize({ arguments })

Arguments

  • id Number (Required)
    The ID of the application

Returns

  • success Boolean
    If the action was successful.
  • message String
    Additional confirmation, or error details if action was unsuccessful.

Maximize External Application

Maximizes an external application.

await window.deskifier.applications.maximize({ arguments })

Arguments

  • id Number (Required)
    The ID of the application

Returns

  • success Boolean
    If the action was successful.
  • message String
    Additional confirmation, or error details if action was unsuccessful.

Set External Application Bounds

Requires accessibility permission on macOS

Sets the position and size of an external application's window.

await window.deskifier.applications.setBounds({ arguments })

Arguments

  • id Number (Required)
    The ID of the application
  • x Number (Optional)
    The X offset.
  • y Number (Optional)
    The Y offset.
  • width Number (Optional)
    The width of the external application.
  • height Number (Optional)
    The height of the external application.

Returns

  • success Boolean
    If the action was successful.
  • message String
    Additional confirmation, or error details if action was unsuccessful.

Overlay

Starts an overlay window that follows an external application or the active focus.

await window.deskifier.applications.overlay({ arguments })

Arguments

  • applicationId Number (Optional)
    The ID of the application to overlay. If omitted, the overlay follows focus.
  • windowId String (Optional)
    A specific window ID to target.
  • refreshInterval Number (Optional)
    How often (in ms) the overlay position refreshes while the target is active.
  • idleRefreshInterval Number (Optional)
    How often (in ms) the overlay position refreshes while the target is idle.

Returns

  • success Boolean
    If the action was successful.
  • message String
    Additional confirmation, or error details if action was unsuccessful.
  • windowId String
    The ID of the overlay window.
  • applicationId Number
    The ID of the application being overlaid, or null if following focus.
  • followsFocus Boolean
    Whether the overlay follows the active focus.
  • refreshInterval Number
  • idleRefreshInterval Number

Stop Overlay

Stops an active overlay window.

await window.deskifier.applications.stopOverlay({ arguments })

Arguments

  • windowId String (Optional)
    The ID of the overlay window to stop. If omitted, stops the current overlay.

Returns

  • success Boolean
    If the action was successful.
  • message String
    Additional confirmation, or error details if action was unsuccessful.

Properties

Get Active Application

Returns the current active (focused) application details.

await window.deskifier.applications.getActive()

Returns

  • success Boolean
    If the action was successful.
  • message String
    Additional confirmation, or error details if action was unsuccessful.
  • applicationDetails Deskifier.applicationDetails

Get Applications

Returns applications currently running on the device.

await window.deskifier.applications.getAll()

Returns

  • success Boolean
    If the action was successful.
  • message String
    Additional confirmation, or error details if action was unsuccessful.
  • applicationDetails Array Of Deskifier.applicationDetails

Get Tracked Overlays

Returns all currently active overlay windows.

await window.deskifier.applications.getTrackedOverlays()

Returns

  • success Boolean
    If the action was successful.
  • message String
    Additional confirmation, or error details if action was unsuccessful.
  • overlays Array of overlay objects.

Events

External Application Activated

Fires when a user switches applications.

window.deskifier.applications.onExternalActivated((data) => { })

Arguments


Overlay Started

Fires when an overlay window starts tracking an application.

window.deskifier.applications.onOverlayStarted((data) => { })

Arguments

  • windowId String
  • applicationId Number — null if following focus.
  • followsFocus Boolean
  • refreshInterval Number
  • idleRefreshInterval Number

Overlay Stopped

Fires when an overlay window stops tracking.

window.deskifier.applications.onOverlayStopped((data) => { })

Arguments

  • windowId String
  • reason String
    Why the overlay stopped. One of: manual, replaced, window-destroyed, target-gone.

Objects

applicationDetails

  • id Number
    The ID of the application.
  • title String
    The application title.
  • processId Number
  • path String
    The application executable path.
  • bounds Object (Optional)
    • width Number
      The application's window width.
    • height Number
      The application's window height.
    • x Number
      The application's window X offset.
    • y Number
      The application's window Y offset.
  • isVisible Boolean (Optional)
    If the application is currently visible (Note, this isn't always fully accurate).
  • isWindow Boolean (Optional)
    If the application has an interactive window (Note, this isn't always fully accurate).
  • zOrder Number (Optional)
    The application's Z-order position in the window stack.
  • icon String (Optional)
    Base64-encoded icon image for the application, or null if unavailable.