From bb51a51a7bdfd2151f442a65750eb1906c87b5c5 Mon Sep 17 00:00:00 2001 From: The_miro Date: Sun, 31 May 2026 22:08:24 +0200 Subject: [PATCH] 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 }) --------------------