nixos-config/home/hypridle.nix
xbazzi 20e6156509
All checks were successful
Simple Mirror to GitHub / mirror (push) Successful in 30s
Feat: Add gitea workflow + some hyprland changes
2025-08-21 23:48:51 -06:00

41 lines
1019 B
Nix

{
inputs,
pkgs,
lib,
config,
...
}:
{
services.hypridle = {
enable = true;
settings = {
general = {
# lock_cmd = "hyprctl dispatch exec 'hyprlock --immediate'";
lock_cmd = "pidof hyprlock || ${pkgs.hyprlock}/bin/hyprlock";
before_sleep_cmd = "hyprctl dispatch exec 'hyprlock --immediate'";
# before_sleep_cmd = "loginctl lock-session";
# after_sleep_cmd = "notify-send '💡 Welcome back, badman!'";
after_sleep_cmd = "hyprctl dispatch dpms on";
};
listener = [
{
timeout = 10; # 4.5 min — warn before lock
on-timeout = "notify-send '🔒 Locking in 30s...'";
# on-timeout = "notify-send 'hiii'";
}
{
timeout = 1000; # 16 min — lock screen
on-timeout = "hyprctl dispatch exec 'hyprlock --immediate'";
}
# {
# timeout = 900; # 15 min — suspend
# on-timeout = "systemctl suspend";
# }
];
};
};
}