39 lines
1.0 KiB
Nix
39 lines
1.0 KiB
Nix
{pkgs, ...}: {
|
|
wayland.windowManager.hyprland.settings = {
|
|
exec-once = [
|
|
"uwsm app -- hypridle"
|
|
];
|
|
};
|
|
services.hypridle = {
|
|
enable = true;
|
|
settings = {
|
|
general = {
|
|
after_sleep_cmd = "hyprctl dispatch dpms on";
|
|
ignore_dbus_inhibit = false;
|
|
lock_cmd = "hakase-hyprlock";
|
|
before_sleep_cmd = "loginctl lock-session"; # lock before suspend
|
|
};
|
|
|
|
listener = [
|
|
# {
|
|
# timeout = 180; # 3min
|
|
# on-timeout = "tte-screensaver";
|
|
# }
|
|
{
|
|
timeout = 300; # 5min
|
|
on-timeout = "loginctl lock-session"; # lock screen when timeout has passed
|
|
}
|
|
{
|
|
timeout = 330; # 5.5min
|
|
on-timeout = "hyprctl dispatch dpms off"; # screen off when timeout has passed
|
|
on-resume = "hyprctl dispatch dpms on"; # screen on when activity is detected after timeout has passed
|
|
}
|
|
{
|
|
timeout = 660;
|
|
on-timeout = "systemctl suspend"; # suspend pc
|
|
}
|
|
];
|
|
};
|
|
};
|
|
}
|