Display and UI
These global variables provide information about the display, window, and UI state of the OSL environment.
Window and Focus Variables
focused_application
String
Name of the currently focused application
focused_application_id
Number
ID of the currently focused application
is_origin_focused
Boolean
Whether the Origin environment has focus
window_top_index
Number
Z-index of the topmost window
Display Variables
background_width
Number
Width of the application background in pixels
background_height
Number
Height of the application background in pixels
picker_colour
String
Currently selected color in the color picker (hex format)
on_mobile
Boolean
Whether the app is running on a mobile device
Battery Information
battery_charging
Boolean
Whether the device is currently charging
battery_percent
Number
Current battery percentage (0-100)
battery_time_until_full
Number
Estimated time in seconds until battery is fully charged (null if not charging)
battery_time_until_empty
Number
Estimated time in seconds until battery is depleted
Examples
Last updated
Was this helpful?