From 3bb65eecb7d757c4275d9a7eac296c0b4f865a85 Mon Sep 17 00:00:00 2001 From: Thierry Schork Date: Mon, 9 Feb 2026 16:47:39 +0100 Subject: [PATCH] moved lid open/close actions to shell scripts and reflected it in the hyprland config --- .config/hypr/hyprland.conf | 4 ++-- bin/lid_close.sh | 2 ++ bin/lid_open.sh | 5 +++++ 3 files changed, 9 insertions(+), 2 deletions(-) create mode 100755 bin/lid_close.sh create mode 100755 bin/lid_open.sh diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf index 14e90f6..aed35a5 100755 --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf @@ -195,9 +195,9 @@ bind = , XF86MonBrightnessDown, exec, sudo brightnessctl s "10%-" #lid binds #bindl = , switch:on:Lid Switch, exec, swaylock --screenshots --effect-blur 7x5 --clock # trigger when the switch is turning off -bindl = , switch:off:Lid Switch,exec,hyprctl keyword monitor "eDP-1, preferred, 0x0, 1" +bindl = , switch:off:Lid Switch,exec,~/bin/lid_open.sh # # trigger when the switch is turning on -bindl = , switch:on:Lid Switch,exec,hyprctl keyword monitor "eDP-1, disable" +bindl = , switch:on:Lid Switch,exec,~/bin/lid_close.sh # Desktop zooming or magnifier bindd = $mainMod ALT, mouse_down, zoom in, exec, hyprctl keyword cursor:zoom_factor "$(hyprctl getoption cursor:zoom_factor | awk 'NR==1 {factor = $2; if (factor < 1) {factor = 1}; print factor * 2.0}')" diff --git a/bin/lid_close.sh b/bin/lid_close.sh new file mode 100755 index 0000000..69446cb --- /dev/null +++ b/bin/lid_close.sh @@ -0,0 +1,2 @@ +#!/bin/bash +hyprctl keyword monitor "eDP-1, disable" diff --git a/bin/lid_open.sh b/bin/lid_open.sh new file mode 100755 index 0000000..1a7a756 --- /dev/null +++ b/bin/lid_open.sh @@ -0,0 +1,5 @@ +#!/bin/bash +hyprctl keyword monitor "eDP-1, preferred, 0x0, 1" +hyprlock + +