summaryrefslogtreecommitdiffstats
path: root/.config/hypr
diff options
context:
space:
mode:
Diffstat (limited to '.config/hypr')
-rw-r--r--.config/hypr/conf/keybinds.conf2
-rwxr-xr-x.config/hypr/scripts/switch.sh10
2 files changed, 12 insertions, 0 deletions
diff --git a/.config/hypr/conf/keybinds.conf b/.config/hypr/conf/keybinds.conf
index e1d9695..b192c5d 100644
--- a/.config/hypr/conf/keybinds.conf
+++ b/.config/hypr/conf/keybinds.conf
@@ -92,3 +92,5 @@ bind = $mainMod SHIFT, code:58, movetoworkspace, name:music
92# Move/resize windows with mainMod + LMB/RMB and dragging 92# Move/resize windows with mainMod + LMB/RMB and dragging
93bindm = $mainMod, mouse:272, movewindow 93bindm = $mainMod, mouse:272, movewindow
94bindm = $mainMod, mouse:273, resizewindow 94bindm = $mainMod, mouse:273, resizewindow
95
96bindl=,switch:Lid Switch, exec, ~/.config/hypr/scripts/switch.sh
diff --git a/.config/hypr/scripts/switch.sh b/.config/hypr/scripts/switch.sh
new file mode 100755
index 0000000..81ae9e8
--- /dev/null
+++ b/.config/hypr/scripts/switch.sh
@@ -0,0 +1,10 @@
1#!/usr/bin/env bash
2# https://github.com/hyprwm/Hyprland/issues/1754#issue-1618824532
3
4if grep open /proc/acpi/button/lid/LID0/state; then
5 hyprctl keyword monitor "eDP-1,highres,auto,1"
6else
7 if [[ `hyprctl monitors | grep "Monitor" | wc -l` != 1 ]]; then
8 hyprctl keyword monitor "eDP-1, disable"
9 fi
10fi