Skip to content

glasses.getWindowSize

since 26.1.0

Get the window size.

local width = glasses.getWindowSize()

Parameters

None.

Returns

width (integer): window with

Used in

Real-world usage

Called 2 times across 2 open-source Ethos Lua projects. A few short excerpts:
if not glasses or not glasses.getWindowSize or not glasses.createLayout then return false end
local w, h = glasses.getWindowSize()

src/rfsuite/widgets/activelook.lua:244