Set up for laptop docking
This commit is contained in:
+42
-10
@@ -1,15 +1,47 @@
|
||||
-- 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 = "auto-left",
|
||||
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 = "auto-right",
|
||||
}
|
||||
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
|
||||
|
||||
if is_lid_closed() then
|
||||
hl.monitor {
|
||||
output = 'desc:BOE NE160QDM-NZ6',
|
||||
disabled = true,
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user