diff --git a/nix/homes/x86_64-linux/sab@nz/default.nix b/nix/homes/x86_64-linux/sab@nz/default.nix index 706c7ef..7eb8e1d 100644 --- a/nix/homes/x86_64-linux/sab@nz/default.nix +++ b/nix/homes/x86_64-linux/sab@nz/default.nix @@ -21,7 +21,7 @@ with lib.custom; { rofi = enabled; kitty = disabled; swaylock = enabled; - swayidle = enabled; + hypridle = enabled; waybar = enabled; wlogout = enabled; hyprlock = disabled; diff --git a/nix/modules/home/desktop/addons/hypridle/default.nix b/nix/modules/home/desktop/addons/hypridle/default.nix index 3d19832..d8c287d 100644 --- a/nix/modules/home/desktop/addons/hypridle/default.nix +++ b/nix/modules/home/desktop/addons/hypridle/default.nix @@ -20,21 +20,27 @@ in { config = mkIf cfg.enable { services.hypridle = { enable = true; - package = pkgs.hypridle; + # package = pkgs.hypridle; - lockCmd = "${getExe config.programs.hypridle.package}"; + lockCmd = "${pkgs.swaylock-effects}/bin/swaylock -fF"; afterSleepCmd = "${getExe' config.wayland.windowManager.hyprland.package "hyprctl"} dispatch dpms on"; + # 5 min lock, 10min turn the screen off, 20 min suspend listeners = [ { - timeout = 900; - onTimeout = "${getExe config.programs.hypridle.package}"; + timeout = 300; + onTimeout = "${pkgs.swaylock-effects}/bin/swaylock -fF"; } { - timeout = 1200; + timeout = 600; onTimeout = "${getExe' config.wayland.windowManager.hyprland.package "hyprctl"} dispatch dpms off"; onResume = "${getExe' config.wayland.windowManager.hyprland.package "hyprctl"} dispatch dpms on"; } + { + timeout = 1200; + onTimeout = "${pkgs.systemd}/bin/systemctl suspend"; + onResume = "${getExe' config.wayland.windowManager.hyprland.package "hyprctl"} dispatch dpms on"; + } ]; }; };