From c222e1bad2ba5e779c3af5b956906c82ead43271 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Sun, 22 Oct 2023 15:55:57 +0900 Subject: Initial upload --- config/hypr/scripts/LidSwitch.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 config/hypr/scripts/LidSwitch.sh (limited to 'config/hypr/scripts/LidSwitch.sh') diff --git a/config/hypr/scripts/LidSwitch.sh b/config/hypr/scripts/LidSwitch.sh new file mode 100755 index 00000000..76bce1f2 --- /dev/null +++ b/config/hypr/scripts/LidSwitch.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +if grep open /proc/acpi/button/lid/LID/state; then + hyprctl keyword monitor "eDP-1, preferred, auto, 1" +else + if [[ `hyprctl monitors | grep "Monitor" | wc -l` != 1 ]]; then + hyprctl keyword monitor "eDP-1, disable" + fi +fi \ No newline at end of file -- cgit v1.2.3