add better fullscreen workaround, move monitors into separate file

This commit is contained in:
2026-10-12 10:07:47 -07:00
parent 5c068602d5
commit 7ca06e60f1
2 changed files with 12 additions and 17 deletions
+1
View File
@@ -0,0 +1 @@
monitors.lua
+11 -17
View File
@@ -12,20 +12,7 @@ hl.env("HYPRCURSOR_SIZE", "24")
-- hl.env("DISPLAY", ":0")
-- hl.env("USE_X11", "false")
-- monitors
hl.monitor({
output = "HDMI-A-2",
mode = "2560x1440@143.99899",
position = "1920x0",
scale = "1.25",
})
hl.monitor({
output = "DP-4",
mode = "1920x1080@143.99",
position = "0x0",
scale = "auto",
})
require("monitors")
local home = os.getenv("HOME")
@@ -167,9 +154,16 @@ hl.bind(mainMod .. " + SPACE", hl.dsp.window.float({ action = "toggle" }))
-- toggle maximize in scrolling mode; from https://github.com/hyprwm/Hyprland/discussions/14380
hl.bind(mainMod .. " + F", function()
hl.dispatch(hl.dsp.layout("colresize +conf"))
hl.dispatch(hl.dsp.layout("focus r"))
hl.dispatch(hl.dsp.layout("focus l"))
local monitor = hl.get_active_monitor()
local window = hl.get_active_window()
if monitor and window and type(window.size) == "table" then
if window.size.x >= monitor.width / 2 then
hl.dispatch(hl.dsp.layout("colresize 0.5"))
else
hl.dispatch(hl.dsp.layout("colresize 1"))
end
end
end
)
hl.bind(mainMod .. " + SHIFT + Q", hl.dsp.window.close())