hl.monitor¶
- hl.monitor(spec)¶
Configure a monitor.
hl.monitoradds one monitor configuration entry. The configuration is described byHL.MonitorSpec.
Signature¶
hl.monitor(spec: HL.MonitorSpec): nil
Parameters¶
- spec
HL.MonitorSpec Monitor configuration table. The
outputfield is required.
Returns¶
- nil
This function configures Hyprland and does not return a value.
Examples¶
Configure a monitor by output name:
hl.monitor({
output = "DP-1",
mode = "2560x1440@60",
position = "0x0",
scale = 1,
})
Disable a monitor:
hl.monitor({
output = "HDMI-A-1",
disabled = true,
})
Reserve space for a bar:
hl.monitor({
output = "DP-1",
reserved = {
top = 32,
right = 0,
bottom = 0,
left = 0,
},
})
See also¶
HL.MonitorSpecTable accepted by
hl.monitor.HL.MonitorRuntime monitor object returned by monitor query functions.
hl.get_monitor()Get one monitor by selector.
hl.get_monitor_at()Get the monitor at a position.
hl.get_monitor_at_cursor()Get the monitor containing the cursor.
hl.get_monitors()Get all current monitor objects.