flake/pkgs/scripts/screenshot.nix

24 lines
595 B
Nix
Raw Normal View History

2024-03-02 12:50:51 +00:00
{
makeScript,
coreutils,
jq,
grim,
slurp,
swappy,
wl-clipboard,
libnotify,
fetchurl,
}:
makeScript {
name = "screenshot";
runtimeInputs = [coreutils jq grim slurp swappy wl-clipboard libnotify];
2024-06-18 01:42:20 +00:00
src = fetchurl {
2024-06-14 23:25:48 +00:00
url = "https://raw.githubusercontent.com/nwg-piotr/nwg-shell/c29e8eb4658a2613fb221ead0b101c75f457bcaf/scripts/screenshot";
hash = "sha256-w0zdCX6az0WNM0G4RrNuKbQ0O9aSIK6ssAMMaFlsjA0=";
2024-06-14 23:25:48 +00:00
postFetch = ''
substituteInPlace $out \
--replace-fail 'DIR=''${SCREENSHOT_DIR:=$HOME/Screenshots}' 'DIR=$HOME/Pictures/Screenshots'
2024-06-14 23:25:48 +00:00
'';
2024-03-02 12:50:51 +00:00
};
}