Stark API Documentation

Stark provides a JavaScript API for configuring your window management.

The classes below are available in the global scope. Static methods will be accessible on the global object, and the instance methods and fields available on objects returned from static methods.

There is a global print function available to aid with debugging.

Application

Application is used for interacting with running applications. References to an application can become stale if the application is terminated, use isTerminated to check.

Static Methods

Instance Methods

Instance Fields

Window

Window is used for interacting with application windows. A window is displayed on a screen within a rectangle. Their position can be alterated by giving coordinates to a point within the rectangle.

Static Methods

Instance Methods

Instance Fields

Screen

Screen is used for interacting with a display’s frame size, and other screens when using multiple screens.

Static Methods

Instance Methods

Instance Fields

Space

Space is used for interacting with mission control spaces. Due to changes in newer macOS versions, this functionality has been become less useful as we’re unable to move windows programmatically between spaces now.

Static Methods

Instance Methods

Instance Fields

Keymap

Keymap is used for registering shortcuts with a callback function.

Static Methods

Instance Fields

Types

These are types that are returned by methods and fields, or as arguments to method calls.

Rectangle

Point

Size