From 61316e88acb1dccf9aa71d22d28006d141067b57 Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Mon, 27 May 2024 13:18:21 -0400 Subject: [PATCH] hyprland/sway: cleaned up idle scripts --- homeManagerModules/desktop/hyprland/default.nix | 5 ++--- homeManagerModules/desktop/sway/default.nix | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/homeManagerModules/desktop/hyprland/default.nix b/homeManagerModules/desktop/hyprland/default.nix index 03b99a6a..2d21db50 100644 --- a/homeManagerModules/desktop/hyprland/default.nix +++ b/homeManagerModules/desktop/hyprland/default.nix @@ -129,7 +129,8 @@ idled = pkgs.writeShellScript "hyprland-idled" '' ${lib.getExe pkgs.swayidle} -w \ - \ + before-sleep '${media} pause' \ + before-sleep '${lock}' \ timeout 240 '${lib.getExe pkgs.brightnessctl} -s set 10' \ resume '${lib.getExe pkgs.brightnessctl} -r' \ timeout 300 '${lock}' \ @@ -140,8 +141,6 @@ then ''timeout 900 '${lib.getExe' pkgs.systemd "systemctl"} suspend' \'' else ''\'' } - before-sleep '${media} pause' \ - before-sleep '${lock}' ''; hyprnome = lib.getExe inputs.nixpkgsUnstable.legacyPackages."${pkgs.system}".hyprnome; diff --git a/homeManagerModules/desktop/sway/default.nix b/homeManagerModules/desktop/sway/default.nix index 6c4b595b..442b62c3 100644 --- a/homeManagerModules/desktop/sway/default.nix +++ b/homeManagerModules/desktop/sway/default.nix @@ -119,6 +119,8 @@ lock = lib.getExe pkgs.swaylock; idled = pkgs.writeShellScript "sway-idled" '' ${lib.getExe pkgs.swayidle} -w \ + before-sleep '${media} pause' \ + before-sleep '${lock}' \ timeout 240 '${lib.getExe pkgs.brightnessctl} -s set 10' \ resume '${lib.getExe pkgs.brightnessctl} -r' \ timeout 300 '${lock}' \ @@ -129,8 +131,6 @@ then ''timeout 900 '${lib.getExe' pkgs.systemd "systemctl"} suspend' \'' else ''\'' } - before-sleep '${media} pause' \ - before-sleep '${lock}' ''; screenshot = lib.getExe' pkgs.shotman "shotman";