nixos-config/home-manager/modules/hyprland/hypridle.nix
gwg313 bb2fe56082
Some checks failed
Basic Code Checks / formatting-check (push) Has been cancelled
style
Signed-off-by: gwg313 <gwg313@pm.me>
2025-07-03 10:34:00 -04:00

27 lines
672 B
Nix

# Hypridle is a daemon that listens for user activity and runs commands when the user is idle.
{ pkgs, ... }:
{
services.hypridle = {
enable = true;
settings = {
general = {
ignore_dbus_inhibit = false;
lock_cmd = "pidof hyprlock || ${pkgs.hyprlock}/bin/hyprlock";
before_sleep_cmd = "loginctl lock-session";
after_sleep_cmd = "hyprctl dispatch dpms on";
};
listener = [
{
timeout = 600;
on-timeout = "pidof hyprlock || ${pkgs.hyprlock}/bin/hyprlock";
}
# {
# timeout = 660;
# on-timeout = "systemctl suspend";
# }
];
};
};
}