24 lines
619 B
Nix
24 lines
619 B
Nix
{
|
|
pkgs,
|
|
config,
|
|
lib,
|
|
...
|
|
}: {
|
|
services.hypridle = {
|
|
enable = true;
|
|
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 = "${config.wayland.windowManager.hyprland.package}/bin/hyprctl dispatch dpms off";
|
|
onResume = "${config.wayland.windowManager.hyprland.package}/bin/hyprctl dispatch dpms on";
|
|
}
|
|
];
|
|
};
|
|
}
|