summaryrefslogtreecommitdiffstats
path: root/.config/hypr/scripts
diff options
context:
space:
mode:
Diffstat (limited to '.config/hypr/scripts')
-rwxr-xr-x.config/hypr/scripts/switch.sh10
1 files changed, 10 insertions, 0 deletions
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