hyprland/sway: cleaned up idle scripts

This commit is contained in:
Aly Raffauf 2024-05-27 13:18:21 -04:00
parent 795ed12ecf
commit 61316e88ac
2 changed files with 4 additions and 5 deletions

View file

@ -129,7 +129,8 @@
idled = pkgs.writeShellScript "hyprland-idled" '' idled = pkgs.writeShellScript "hyprland-idled" ''
${lib.getExe pkgs.swayidle} -w \ ${lib.getExe pkgs.swayidle} -w \
\ before-sleep '${media} pause' \
before-sleep '${lock}' \
timeout 240 '${lib.getExe pkgs.brightnessctl} -s set 10' \ timeout 240 '${lib.getExe pkgs.brightnessctl} -s set 10' \
resume '${lib.getExe pkgs.brightnessctl} -r' \ resume '${lib.getExe pkgs.brightnessctl} -r' \
timeout 300 '${lock}' \ timeout 300 '${lock}' \
@ -140,8 +141,6 @@
then ''timeout 900 '${lib.getExe' pkgs.systemd "systemctl"} suspend' \'' then ''timeout 900 '${lib.getExe' pkgs.systemd "systemctl"} suspend' \''
else ''\'' else ''\''
} }
before-sleep '${media} pause' \
before-sleep '${lock}'
''; '';
hyprnome = lib.getExe inputs.nixpkgsUnstable.legacyPackages."${pkgs.system}".hyprnome; hyprnome = lib.getExe inputs.nixpkgsUnstable.legacyPackages."${pkgs.system}".hyprnome;

View file

@ -119,6 +119,8 @@
lock = lib.getExe pkgs.swaylock; lock = lib.getExe pkgs.swaylock;
idled = pkgs.writeShellScript "sway-idled" '' idled = pkgs.writeShellScript "sway-idled" ''
${lib.getExe pkgs.swayidle} -w \ ${lib.getExe pkgs.swayidle} -w \
before-sleep '${media} pause' \
before-sleep '${lock}' \
timeout 240 '${lib.getExe pkgs.brightnessctl} -s set 10' \ timeout 240 '${lib.getExe pkgs.brightnessctl} -s set 10' \
resume '${lib.getExe pkgs.brightnessctl} -r' \ resume '${lib.getExe pkgs.brightnessctl} -r' \
timeout 300 '${lock}' \ timeout 300 '${lock}' \
@ -129,8 +131,6 @@
then ''timeout 900 '${lib.getExe' pkgs.systemd "systemctl"} suspend' \'' then ''timeout 900 '${lib.getExe' pkgs.systemd "systemctl"} suspend' \''
else ''\'' else ''\''
} }
before-sleep '${media} pause' \
before-sleep '${lock}'
''; '';
screenshot = lib.getExe' pkgs.shotman "shotman"; screenshot = lib.getExe' pkgs.shotman "shotman";