diff --git a/install.sh b/install.sh index 2b0b8b3..5ac96bf 100755 --- a/install.sh +++ b/install.sh @@ -67,4 +67,8 @@ echo "==> Deploying greetd config" sudo cp "$(pwd)/greetd/config.toml" /etc/greetd/config.toml sudo cp "$(pwd)/greetd/regreet.toml" /etc/greetd/regreet.toml +echo "==> Deploying suspend/hibernate config" +sudo install -Dm644 "$(pwd)/logind/lid.conf" /etc/systemd/logind.conf.d/lid.conf +sudo install -Dm644 "$(pwd)/sleep/hibernate-delay.conf" /etc/systemd/sleep.conf.d/hibernate-delay.conf + echo "==> Done. Start Niri with: niri-session" diff --git a/logind/lid.conf b/logind/lid.conf new file mode 100644 index 0000000..c40df3b --- /dev/null +++ b/logind/lid.conf @@ -0,0 +1,4 @@ +[Login] +HandleLidSwitch=suspend-then-hibernate +HandleLidSwitchExternalPower=suspend-then-hibernate +HandleLidSwitchDocked=ignore diff --git a/sleep/hibernate-delay.conf b/sleep/hibernate-delay.conf new file mode 100644 index 0000000..ff73bf7 --- /dev/null +++ b/sleep/hibernate-delay.conf @@ -0,0 +1,2 @@ +[Sleep] +HibernateDelaySec=30min