2024-03-07 03:54:42 -05:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
lib,
|
2024-04-22 16:16:03 -04:00
|
|
|
config,
|
2024-03-07 03:54:42 -05:00
|
|
|
...
|
|
|
|
}: {
|
|
|
|
services.hypridle = {
|
|
|
|
enable = true;
|
2024-05-12 23:54:01 -04:00
|
|
|
settings = {
|
|
|
|
ignoreDbusInhibit = false;
|
|
|
|
lockCmd = lib.getExe config.programs.hyprlock.package;
|
|
|
|
beforeSleepCmd = "${pkgs.systemd}/bin/loginctl lock-session";
|
|
|
|
listeners = [
|
|
|
|
{
|
|
|
|
timeout = 400;
|
|
|
|
onTimeout = "${lib.getExe config.programs.hyprlock.package}";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
timeout = 460;
|
|
|
|
onTimeout = "${pkgs.systemd}/bin/systemctl suspend";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
2024-03-07 03:54:42 -05:00
|
|
|
};
|
|
|
|
}
|