feat: add screenshot script

This commit is contained in:
Nickolaj Jepsen 2025-08-21 10:31:34 +02:00
parent f905444ccf
commit 94194bf902
2 changed files with 12 additions and 0 deletions

View file

@ -0,0 +1,11 @@
{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 --copy-command=${pkgs.wl-clipboard}/bin/wl-copy --action-on-enter="save-to-clipboard" --disable-notifications
'';
in {
environment.systemPackages = [
screenshotPkg
];
}