From ce4043c73fe06966f9d9fe2ecc8ad48e139da57f Mon Sep 17 00:00:00 2001 From: matt1432 <matt@nelim.org> Date: Thu, 8 May 2025 09:26:40 -0400 Subject: [PATCH] fix(hypr): make script instead of bash -c call --- flake.lock | 2 +- modules/ags/hyprland.nix | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 5f144021..5eecb711 100644 --- a/flake.lock +++ b/flake.lock @@ -526,7 +526,7 @@ }, "locked": { "lastModified": 1746483018, - "narHash": "sha256-8Sl2V23EYcZMniBLmKenxH7bMLTGC6Q84ntyFvOUkWU=", + "narHash": "sha256-J1HgPYa3UiQmv7g8Eo6k6QkTiVt9kfQR2sRb8QkGbwk=", "owner": "horriblename", "repo": "hyprgrass", "rev": "ea3067fd9cdff09821121a6c63d633226266aaa8", diff --git a/modules/ags/hyprland.nix b/modules/ags/hyprland.nix index 42036677..08bc5a14 100644 --- a/modules/ags/hyprland.nix +++ b/modules/ags/hyprland.nix @@ -1,11 +1,12 @@ self: { lib, osConfig, + pkgs, ... }: let inherit (self.lib.hypr) mkAnimation mkBezier mkBind mkLayerRule; - inherit (lib) mkIf; + inherit (lib) getExe mkIf; cfgDesktop = osConfig.roles.desktop; in { @@ -161,7 +162,13 @@ in { { modifier = "$mainMod"; key = "Print"; - command = "bash -c \"grim -g \\\"$(slurp)\\\" - | satty -f -\""; + command = getExe (pkgs.writeShellApplication { + name = "select-screenshot"; + runtimeInputs = with pkgs; [grim-hyprland satty slurp]; + text = '' + grim -g "$(slurp)" - | satty -f - + ''; + }); } ];