fix(hypr): make script instead of bash -c call

This commit is contained in:
matt1432 2025-05-08 09:26:40 -04:00
parent ca92ad1f82
commit ce4043c73f
2 changed files with 10 additions and 3 deletions

2
flake.lock generated
View file

@ -526,7 +526,7 @@
},
"locked": {
"lastModified": 1746483018,
"narHash": "sha256-8Sl2V23EYcZMniBLmKenxH7bMLTGC6Q84ntyFvOUkWU=",
"narHash": "sha256-J1HgPYa3UiQmv7g8Eo6k6QkTiVt9kfQR2sRb8QkGbwk=",
"owner": "horriblename",
"repo": "hyprgrass",
"rev": "ea3067fd9cdff09821121a6c63d633226266aaa8",

View file

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