Skip to content

Monitor

attach

(method) Monitor:attach(props: BarProps)
  -> Bar

Attaches a component on the monitor.

Example

local monitors = hitokage.monitor.get_all()

for _, monitor in ipairs(monitors) do
  monitor:attach({
    children = {
      { Box = {} },
      { Workspace = { halign = "Center", item_height = 22, item_width = 22 } },
      { Clock = { format = "%a %b %u %r", halign = 'End' } },
    },
  })
end

connector

string|nil

description

string|nil

device

string

device_id

string

geometry

MonitorGeometry

Links to 'pub struct MonitorGeometry' in 'hitokage-core\src\lua\monitor.rs'

id

number

is_primary

boolean

manufacturer

string|nil

model

string|nil

name

string

refresh_rate

number

This value is in millihertz (mHz) not hertz (Hz)

scale_factor

MonitorScaleFactor

Links to 'pub struct MonitorScaleFactor' in 'hitokage-core\src\lua\monitor.rs'