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 - + ''; + }); } ];