From e6be419dddfc664dd1c0ada1a7b79c663efed623 Mon Sep 17 00:00:00 2001
From: notohh <github@notohh.dev>
Date: Fri, 21 Feb 2025 22:08:28 -0500
Subject: [PATCH] wayland: update hyprland, hypridle, hyprlock configs

---
 home/wayland/default.nix                 | 3 ---
 home/wayland/hyprland/config/binds.nix   | 7 ++++++-
 home/wayland/hyprland/config/general.nix | 3 ---
 home/wayland/programs/hyprlock.nix       | 8 ++++++--
 home/wayland/services/hypridle.nix       | 5 +++--
 5 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/home/wayland/default.nix b/home/wayland/default.nix
index 9ffda87..45fbe8f 100644
--- a/home/wayland/default.nix
+++ b/home/wayland/default.nix
@@ -4,9 +4,6 @@
     systemPackages = with pkgs; [
       wayland
       glib
-      grim
-      slurp
-      satty
       wl-clipboard
     ];
     sessionVariables = {
diff --git a/home/wayland/hyprland/config/binds.nix b/home/wayland/hyprland/config/binds.nix
index 9e26257..25a4715 100644
--- a/home/wayland/hyprland/config/binds.nix
+++ b/home/wayland/hyprland/config/binds.nix
@@ -1,4 +1,8 @@
-_: {
+{
+  lib,
+  pkgs,
+  ...
+}: {
   wayland.windowManager.hyprland.settings = {
     "$mainMod" = "SUPER";
     bind = [
@@ -14,6 +18,7 @@ _: {
       "$mainMod, right, movefocus, r"
       "$mainMod, up, movefocus, u"
       "$mainMod, down, movefocus, d"
+      '', Print, exec, ${lib.getExe pkgs.grim} -g "$(${lib.getExe pkgs.slurp})" - | ${lib.getExe pkgs.satty} -f - --fullscreen --output-filename ~/Pictures/screenshots/$(date '+%Y%m%d-%H:%M:%S').png''
 
       "$mainMod, 1, workspace, 1"
       "$mainMod, 2, workspace, 2"
diff --git a/home/wayland/hyprland/config/general.nix b/home/wayland/hyprland/config/general.nix
index 25f084c..c61d911 100644
--- a/home/wayland/hyprland/config/general.nix
+++ b/home/wayland/hyprland/config/general.nix
@@ -96,8 +96,5 @@
         no_donation_nag = true;
       };
     };
-    extraConfig = ''
-      bind =, Print, exec, grim -g "$(slurp)" - | satty -f - --fullscreen --output-filename ~/Pictures/screenshots/$(date '+%Y%m%d-%H:%M:%S').png
-    '';
   };
 }
diff --git a/home/wayland/programs/hyprlock.nix b/home/wayland/programs/hyprlock.nix
index f046ca0..bba9f9a 100644
--- a/home/wayland/programs/hyprlock.nix
+++ b/home/wayland/programs/hyprlock.nix
@@ -40,13 +40,17 @@ _: {
         disable_loading_bar = false;
         hide_cursor = false;
         no_fade_in = false;
+        ignore_empty_input = true;
+      };
+      animations = {
+        enabled = true;
       };
       input-field = [
         {
           monitor = "DP-1";
           size = "350, 50";
           outline_thickness = 2;
-          outer_color = "rgb(f7768e)";
+          outer_color = "rgb(f5c2e7)";
           inner_color = "rgb(1a1b26)";
           font_color = "rgb(c0caf5)";
           fail_color = "rgb(f7768e)";
@@ -69,7 +73,7 @@ _: {
         {
           monitor = "DP-1";
           text = ''
-            Hi, <i><span foreground="##f7768e">$USER</span></i>
+            Hi, <i><span foreground="##74c7ec">$USER</span></i>
           '';
           color = "rgb(c0caf5)";
           position = "0, 60";
diff --git a/home/wayland/services/hypridle.nix b/home/wayland/services/hypridle.nix
index c01858d..6809526 100644
--- a/home/wayland/services/hypridle.nix
+++ b/home/wayland/services/hypridle.nix
@@ -2,6 +2,7 @@
   pkgs,
   lib,
   config,
+  inputs,
   ...
 }: {
   services.hypridle = {
@@ -18,8 +19,8 @@
           on-timeout = "${lib.getExe config.programs.hyprlock.package}";
         }
         {
-          timeout = 460;
-          on-timeout = "hyprctl dispatch dpms off";
+          timeout = 450;
+          on-timeout = "${inputs.hyprland.packages.${pkgs.system}.hyprland}/bin/hyprctl dispatch dpms off";
         }
       ];
     };