39 lines
1022 B
Nix
39 lines
1022 B
Nix
{
|
|
services.hypridle = {
|
|
enable = true;
|
|
settings = {
|
|
general = {
|
|
lock_cmd = "pidof hyprlock || hyprlock";
|
|
# unlock_cmd = "killall hyprlock";
|
|
before_sleep_cmd = "loginctl lock-session";
|
|
after_sleep_cmd = "hyprctl dispatch dpms on";
|
|
ignore_dbus_inhibit = false;
|
|
};
|
|
|
|
listeners = [
|
|
{
|
|
timeout = 30;
|
|
on-timeout = "pidof hyprlock && hyprctl dispatch dpms off";
|
|
on-resume = "pidof hyprlock && hyprctl dispatch dpms on";
|
|
|
|
}
|
|
{
|
|
timeout = 540;
|
|
on-timeout = "notify-send 'You are idle!'";
|
|
on-resume = "notify-send 'Welcome back!'";
|
|
}
|
|
{
|
|
timeout = 600;
|
|
on-timeout = "loginctl lock-session";
|
|
on-resume = "notify-send 'Desktop Unlocked!'";
|
|
}
|
|
# {
|
|
# timeout = 1200;
|
|
# on-timeout = "systemctl suspend";
|
|
# on-resume = "notify-send 'Welcome back to your desktop!'";
|
|
# }
|
|
];
|
|
};
|
|
};
|
|
}
|