Hyprland-dotfiles/scripts/lid-improvements.sh
Stephan Raabe 498fd92a12 Updates
2024-05-27 16:15:06 +02:00

12 lines
512 B
Bash
Executable File

#!/bin/bash
while IFS= read -r line; do
# If the line starts with # and the next line is not the lines to be added
if [[ $line == \#HandleLidSwitchDocked=ignore ]]; then
# Add the new lines
echo "HandleLidSwitchDocked=ignore" | sudo tee -a /etc/systemd/logind.conf > /dev/null
fi
if [[ $line == \#HoldoffTimeoutSec=5s ]]; then
# Add the new lines
echo "HoldoffTimeoutSec=5s" | sudo tee -a /etc/systemd/logind.conf > /dev/null
fi
done < /etc/systemd/logind.conf