From bb51a51a7bdfd2151f442a65750eb1906c87b5c5 Mon Sep 17 00:00:00 2001 From: The_miro Date: Sun, 31 May 2026 22:08:24 +0200 Subject: [PATCH 1/4] feat(hypr): lock screen on lid close, skip if caffeine mode is on Co-Authored-By: Claude Sonnet 4.6 --- desktopenvs/hyprlua/hypr-usr/binds.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desktopenvs/hyprlua/hypr-usr/binds.lua b/desktopenvs/hyprlua/hypr-usr/binds.lua index f8e781c..3a607b3 100644 --- a/desktopenvs/hyprlua/hypr-usr/binds.lua +++ b/desktopenvs/hyprlua/hypr-usr/binds.lua @@ -12,7 +12,7 @@ local winswitch = "" -- TODO: define your window switcher command ---- LID SWITCH ---- -------------------- -hl.bind("switch:on:Lid Switch", hl.dsp.exec_cmd("systemctl suspend &"), { locked = true }) +hl.bind("switch:on:Lid Switch", hl.dsp.exec_cmd("bash -c 'pidof hypridle > /dev/null && hyprlock'"), { locked = true }) hl.bind("switch:off:Lid Switch", hl.dsp.exec_cmd("hyprctl dispatch exec hyprlock"), { locked = true }) -------------------- From 388eb7b5a5fbc6d857968074745fc86ed024ac89 Mon Sep 17 00:00:00 2001 From: The_miro Date: Sun, 31 May 2026 22:39:43 +0200 Subject: [PATCH 2/4] fix(hypr): use new dispatcher syntax for 4-finger workspace swipe gestures Co-Authored-By: Claude Sonnet 4.6 --- desktopenvs/hyprlua/hypr-usr/binds.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/desktopenvs/hyprlua/hypr-usr/binds.lua b/desktopenvs/hyprlua/hypr-usr/binds.lua index 3a607b3..321a536 100644 --- a/desktopenvs/hyprlua/hypr-usr/binds.lua +++ b/desktopenvs/hyprlua/hypr-usr/binds.lua @@ -28,8 +28,8 @@ hl.gesture({ fingers = 4, direction = "pinchout", action = "close" }) hl.gesture({ fingers = 4, direction = "pinchin", action = function() hl.dsp.exec_cmd(terminal) end }) hl.gesture({ fingers = 4, direction = "down", action = function() hl.dsp.window.move({ workspace = "special:magic" }) end }) hl.gesture({ fingers = 4, direction = "up", action = function() hl.dsp.window.move({ workspace = "r+0" }) end }) -hl.gesture({ fingers = 4, direction = "left", action = function() hl.dsp.window.move({ workspace = "r+1" }) end }) -hl.gesture({ fingers = 4, direction = "right", action = function() hl.dsp.window.move({ workspace = "r-1" }) end }) +hl.gesture({ fingers = 4, direction = "left", action = hl.dsp.window.move({ workspace = "r+1" }) }) +hl.gesture({ fingers = 4, direction = "right", action = hl.dsp.window.move({ workspace = "r-1" }) }) -------------------- ---- APPS ---------- From 6c4dfd10fa0931e58b415393d1aef3deb9050844 Mon Sep 17 00:00:00 2001 From: The_miro Date: Sun, 31 May 2026 22:41:21 +0200 Subject: [PATCH 3/4] fix(hypr): revert gesture action to function callback form Co-Authored-By: Claude Sonnet 4.6 --- desktopenvs/hyprlua/hypr-usr/binds.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/desktopenvs/hyprlua/hypr-usr/binds.lua b/desktopenvs/hyprlua/hypr-usr/binds.lua index 321a536..3a607b3 100644 --- a/desktopenvs/hyprlua/hypr-usr/binds.lua +++ b/desktopenvs/hyprlua/hypr-usr/binds.lua @@ -28,8 +28,8 @@ hl.gesture({ fingers = 4, direction = "pinchout", action = "close" }) hl.gesture({ fingers = 4, direction = "pinchin", action = function() hl.dsp.exec_cmd(terminal) end }) hl.gesture({ fingers = 4, direction = "down", action = function() hl.dsp.window.move({ workspace = "special:magic" }) end }) hl.gesture({ fingers = 4, direction = "up", action = function() hl.dsp.window.move({ workspace = "r+0" }) end }) -hl.gesture({ fingers = 4, direction = "left", action = hl.dsp.window.move({ workspace = "r+1" }) }) -hl.gesture({ fingers = 4, direction = "right", action = hl.dsp.window.move({ workspace = "r-1" }) }) +hl.gesture({ fingers = 4, direction = "left", action = function() hl.dsp.window.move({ workspace = "r+1" }) end }) +hl.gesture({ fingers = 4, direction = "right", action = function() hl.dsp.window.move({ workspace = "r-1" }) end }) -------------------- ---- APPS ---------- From 6d77e2a360ba97e24db0715dbfdd20ae1185a6aa Mon Sep 17 00:00:00 2001 From: The_miro Date: Sun, 31 May 2026 22:46:57 +0200 Subject: [PATCH 4/4] fix(hypr): wrap all gesture dispatcher callbacks in hl.dispatch() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit hl.dsp.*() inside a function callback only constructs a Dispatcher object — hl.dispatch() is required to actually execute it. Co-Authored-By: Claude Sonnet 4.6 --- desktopenvs/hyprlua/hypr-usr/binds.lua | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/desktopenvs/hyprlua/hypr-usr/binds.lua b/desktopenvs/hyprlua/hypr-usr/binds.lua index 3a607b3..f0fd126 100644 --- a/desktopenvs/hyprlua/hypr-usr/binds.lua +++ b/desktopenvs/hyprlua/hypr-usr/binds.lua @@ -20,16 +20,16 @@ hl.bind("switch:off:Lid Switch", hl.dsp.exec_cmd("hyprctl dispatch exec hyprlock -------------------- hl.gesture({ fingers = 3, direction = "horizontal", action = "workspace" }) -hl.gesture({ fingers = 3, direction = "up", action = function() hl.dsp.window.move({ workspace = "special:magic", silent = true }) end }) +hl.gesture({ fingers = 3, direction = "up", action = function() hl.dispatch(hl.dsp.window.move({ workspace = "special:magic", silent = true })) end }) hl.gesture({ fingers = 3, direction = "down", action = "special", workspace_name = "magic" }) -hl.gesture({ fingers = 3, direction = "pinchin", action = function() hl.dsp.exec_cmd(menu) end }) +hl.gesture({ fingers = 3, direction = "pinchin", action = function() hl.dispatch(hl.dsp.exec_cmd(menu)) end }) hl.gesture({ fingers = 3, direction = "pinchout", action = "float" }) hl.gesture({ fingers = 4, direction = "pinchout", action = "close" }) -hl.gesture({ fingers = 4, direction = "pinchin", action = function() hl.dsp.exec_cmd(terminal) end }) -hl.gesture({ fingers = 4, direction = "down", action = function() hl.dsp.window.move({ workspace = "special:magic" }) end }) -hl.gesture({ fingers = 4, direction = "up", action = function() hl.dsp.window.move({ workspace = "r+0" }) end }) -hl.gesture({ fingers = 4, direction = "left", action = function() hl.dsp.window.move({ workspace = "r+1" }) end }) -hl.gesture({ fingers = 4, direction = "right", action = function() hl.dsp.window.move({ workspace = "r-1" }) end }) +hl.gesture({ fingers = 4, direction = "pinchin", action = function() hl.dispatch(hl.dsp.exec_cmd(terminal)) end }) +hl.gesture({ fingers = 4, direction = "down", action = function() hl.dispatch(hl.dsp.window.move({ workspace = "special:magic" })) end }) +hl.gesture({ fingers = 4, direction = "up", action = function() hl.dispatch(hl.dsp.window.move({ workspace = "r+0" })) end }) +hl.gesture({ fingers = 4, direction = "left", action = function() hl.dispatch(hl.dsp.window.move({ workspace = "r+1" })) end }) +hl.gesture({ fingers = 4, direction = "right", action = function() hl.dispatch(hl.dsp.window.move({ workspace = "r-1" })) end }) -------------------- ---- APPS ----------