Testing suspend-then-hibernate
This commit is contained in:
parent
76eb2da501
commit
6af7d2b52f
2 changed files with 9 additions and 1 deletions
|
@ -264,7 +264,7 @@
|
|||
swayidle -w \
|
||||
timeout 120 'swaylock -f' \
|
||||
timeout 180 'hyprctl dispatch dpms off' \
|
||||
timeout 300 'systemctl suspend' \
|
||||
timeout 300 'systemctl suspend-then-hibernate' \
|
||||
resume 'hyprctl dispatch dpms on' \
|
||||
before-sleep 'swaylock -f' \
|
||||
before-sleep 'playerctl pause'
|
||||
|
|
|
@ -46,11 +46,19 @@
|
|||
NIXOS_OZONE_WL = "1";
|
||||
};
|
||||
|
||||
# https://www.freedesktop.org/software/systemd/man/logind.conf.html
|
||||
services.logind.extraConfig = ''
|
||||
IdleActionSec=900
|
||||
IdleAction=suspend-then-hibernate
|
||||
HandleLidSwitch=suspend-then-hibernate
|
||||
HandleLidSwitchDocked=ignore
|
||||
HandleLidSwitchExternalPower=suspend
|
||||
'';
|
||||
|
||||
# https://www.systutorials.com/docs/linux/man/5-systemd-sleep.conf/
|
||||
# HibernateDelaySec is the amount of time the
|
||||
# system sleeps before entering hibernate when
|
||||
# using suspend-then-hibernate
|
||||
systemd.sleep.extraConfig = ''
|
||||
AllowSuspend = yes
|
||||
AllowHibernate = yes
|
||||
|
|
Loading…
Reference in a new issue