mirror of
https://github.com/nickolaj-jepsen/nixos.git
synced 2026-01-22 16:16:50 +01:00
11 lines
No EOL
402 B
Nix
11 lines
No EOL
402 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 --copy-command=${pkgs.wl-clipboard}/bin/wl-copy --action-on-enter="save-to-clipboard" --disable-notifications
|
|
'';
|
|
|
|
in {
|
|
environment.systemPackages = [
|
|
screenshotPkg
|
|
];
|
|
} |