aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr/scripts/LidSwitch.sh
blob: 2a3fc3eba272a13e371d1937e8e246dd91536027 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/env bash
# ==================================================
#  KoolDots (2026) - Laptop Lid Switch Handler
# ==================================================

ACTION="${1:-check}"
LOGFILE="/tmp/hypr_lid.log"

echo "$(date '+%Y-%m-%d %H:%M:%S') - Lid event triggered: $ACTION" >> "$LOGFILE"

if [ "$ACTION" = "close" ]; then
    hyprctl keyword monitor "eDP-1, disable" >> "$LOGFILE" 2>&1
elif [ "$ACTION" = "open" ]; then
    hyprctl keyword monitor "eDP-1, preferred, auto, 1" >> "$LOGFILE" 2>&1
fi
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage