-- See https://wiki.hyprland.org/Configuring/Monitors/ -- List current monitors and resolutions possible: hyprctl monitors hl.monitor { output = 'desc:Samsung Electric Company LU28R55 HNMN500475', mode = '3840x2160', position = '0x0', scale = 1.5, } hl.monitor { output = 'desc:Samsung Electric Company LU28R55 HNMN500462', mode = '3840x2160', position = '2560x0', scale = 1.5, } hl.monitor { output = 'desc:BOE NE160QDM-NZ6', mode = '2560x1600', position = '5120x720', scale = 'auto', } hl.monitor { output = '', mode = 'preferred', position = 'auto', scale = 1 } local function is_lid_closed() local file = io.open('/proc/acpi/button/lid/LID0/state', 'r') if not file then file = io.open('/proc/acpi/button/lid/LID/state', 'r') end if file then local state = file:read '*a' file:close() return string.find(state, 'closed') ~= nil end return false end function toggleLaptopMonitor() hl.monitor { output = 'desc:BOE NE160QDM-NZ6', disabled = not is_lid_closed(), } end