nixos-config/modules/desktop/hyprland/displayswitch.sh
2023-09-28 00:42:26 -04:00

9 lines
253 B
Bash

#!/usr/bin/env bash
if grep open /proc/acpi/button/lid/LID/state; then
hyprctl keyword monitor "eDP-1, 1920x1080, 0x0, 1"
else
if [[ $(hyprctl monitors | grep -c "Monitor") != 1 ]]; then
hyprctl keyword monitor "eDP-1, disable"
fi
fi