fix: fixed lid config
This commit is contained in:
@@ -48,7 +48,7 @@ profile Nomad {
|
||||
output $INTERNAL enable
|
||||
exec ~/.config/kanshi/lid.sh
|
||||
|
||||
exec tuned-adm profile balanced
|
||||
exec tuned-adm profile balanced-battery
|
||||
}
|
||||
|
||||
profile Home {
|
||||
|
||||
@@ -3,10 +3,18 @@
|
||||
LAPTOP_OUTPUT="eDP-1"
|
||||
LID_STATE_FILE="/proc/acpi/button/lid/LID0/state"
|
||||
|
||||
# Resume previous state
|
||||
read -r LS < "$LID_STATE_FILE"
|
||||
|
||||
case "$LS" in
|
||||
*open) swaymsg output "$LAPTOP_OUTPUT" enable ;;
|
||||
*closed) swaymsg output "$LAPTOP_OUTPUT" disable ;;
|
||||
*) echo "Could not get lid state" >&2 ; exit 1 ;;
|
||||
*open)
|
||||
swaymsg output "$LAPTOP_OUTPUT" enable
|
||||
;;
|
||||
*closed)
|
||||
swaymsg output "$LAPTOP_OUTPUT" disable
|
||||
systemctl suspend
|
||||
;;
|
||||
*)
|
||||
echo "Could not get lid state" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
Reference in New Issue
Block a user