From 7a24b71373f915fb95bdc1868b7a839dee3a6523 Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Thu, 10 Oct 2024 10:11:35 +0200 Subject: hypr: laptop docking --- .config/hypr/scripts/switch.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 .config/hypr/scripts/switch.sh (limited to '.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 @@ +#!/usr/bin/env bash +# https://github.com/hyprwm/Hyprland/issues/1754#issue-1618824532 + +if grep open /proc/acpi/button/lid/LID0/state; then + hyprctl keyword monitor "eDP-1,highres,auto,1" +else + if [[ `hyprctl monitors | grep "Monitor" | wc -l` != 1 ]]; then + hyprctl keyword monitor "eDP-1, disable" + fi +fi -- cgit v1.2.3-70-g09d2