nix/nixos/desktop/hypridle.nix

20 lines
474 B
Nix

{ ... }:
{
services.hypridle = {
enable = true;
settings = {
general = {
lock_cmd = "pgrep -x hyprlock || hyprlock";
before_sleep_cmd = "loginctl lock-session";
after_sleep_cmd = "hyprctl dispatch dpms on";
};
listener = [
{
timeout = 900;
"on-timeout" = "loginctl lock-session && hyprctl dispatch dpms off";
"on-resume" = "hyprctl dispatch dpms on";
}
];
};
};
}