diff --git a/homeManagerModules/desktop/hypr/default.nix b/homeManagerModules/desktop/hypr/default.nix index 807fb532..a5c24cfd 100644 --- a/homeManagerModules/desktop/hypr/default.nix +++ b/homeManagerModules/desktop/hypr/default.nix @@ -93,10 +93,10 @@ lock = pkgs.swaylock + ''/bin/swaylock -l -f -c 303446 --indicator-idle-visible --font "Noto SansM Nerd Font Regular" --ring-color ca9ee6 --inside-color 303446''; idled = if osConfig.networking.hostName == "mauville" - then ''${pkgs.swayidle}/bin/swayidle -w timeout 240 '${pkgs.brightnessctl}/bin/brightnessctl -s set 10' resume '${pkgs.brightnessctl}/bin/brightnessctl -r' timeout 300 '${lock}' timeout 330 '${config.wayland.windowManager.sway.package}/bin/swaymsg "output * dpms off"' resume '${config.wayland.windowManager.sway.package}/bin/swaymsg "output * dpms on"' before-sleep '${lock}' + then ''${pkgs.swayidle}/bin/swayidle -w timeout 240 '${pkgs.brightnessctl}/bin/brightnessctl -s set 10' resume '${pkgs.brightnessctl}/bin/brightnessctl -r' timeout 300 '${lock}' timeout 330 '${config.wayland.windowManager.hyprland.package}/bin/hyprctl dispatch dpms off' resume '${config.wayland.windowManager.hyprland.package}/bin/hyprctl dispatch dpms off' before-sleep '${lock}' '' else '' - ${pkgs.swayidle}/bin/swayidle -w timeout 240 '${pkgs.brightnessctl}/bin/brightnessctl -s set 10' resume '${pkgs.brightnessctl}/bin/brightnessctl -r' timeout 300 '${lock}' timeout 330 '${config.wayland.windowManager.sway.package}/bin/swaymsg "output * dpms off"' resume '${config.wayland.windowManager.sway.package}/bin/swaymsg "output * dpms on"' timeout 900 '${pkgs.systemd}/bin/systemctl suspend' before-sleep '${lock}' + ${pkgs.swayidle}/bin/swayidle -w timeout 240 '${pkgs.brightnessctl}/bin/brightnessctl -s set 10' resume '${pkgs.brightnessctl}/bin/brightnessctl -r' timeout 300 '${lock}' timeout 330 '${config.wayland.windowManager.hyprland.package}/bin/hyprctl dispatch dpms off' resume '${config.wayland.windowManager.hyprland.package}/bin/hyprctl dispatch dpms off' timeout 900 '${pkgs.systemd}/bin/systemctl suspend' before-sleep '${lock}' ''; hyprnome = pkgs.hyprnome + "/bin/hyprnome"; diff --git a/homeManagerModules/desktop/hypr/hypridle/default.nix b/homeManagerModules/desktop/hypr/hypridle/default.nix index a2d1df15..2de1a070 100644 --- a/homeManagerModules/desktop/hypr/hypridle/default.nix +++ b/homeManagerModules/desktop/hypr/hypridle/default.nix @@ -18,7 +18,7 @@ general { lock_cmd = pidof hyprlock || ${pkgs.hyprlock}/bin/hyprlock # avoid starting multiple hyprlock instances. before_sleep_cmd = ${pkgs.systemd}/bin/loginctl lock-session # lock before suspend. - after_sleep_cmd = ${pkgs.hyprland}/bin/hyprctl dispatch dpms on # to avoid having to press a key twice to turn on the display. + after_sleep_cmd = ${config.wayland.windowManager.hyprland.package}/bin/hyprctl dispatch dpms on # to avoid having to press a key twice to turn on the display. } listener { @@ -41,8 +41,8 @@ listener { timeout = 330 # 5.5min - on-timeout = ${pkgs.hyprland}/bin/hyprctl dispatch dpms off # screen off when timeout has passed - on-resume = ${pkgs.hyprland}/bin/hyprctl dispatch dpms on # screen on when activity is detected after timeout has fired. + on-timeout = ${config.wayland.windowManager.hyprland.package}/bin/hyprctl dispatch dpms off # screen off when timeout has passed + on-resume = ${config.wayland.windowManager.hyprland.package}/bin/hyprctl dispatch dpms on # screen on when activity is detected after timeout has fired. } listener {