nixos/legacy_modules/desktop/screenshot.nix
2025-08-25 08:07:11 +02:00

14 lines
422 B
Nix

{
pkgs,
lib,
...
}: let
screenshotPkg = pkgs.writeShellScriptBin "screenshot" ''
AREA=$(${lib.getExe pkgs.slurp} -d)
${lib.getExe pkgs.grim} -t ppm -g "$AREA" - | ${lib.getExe pkgs.satty} -f - --initial-tool=arrow --early-exit --copy-command=${pkgs.wl-clipboard}/bin/wl-copy --action-on-enter="save-to-clipboard" --disable-notifications
'';
in {
environment.systemPackages = [
screenshotPkg
];
}