diff options
Diffstat (limited to '')
| -rw-r--r-- | pkgs/scripts/clip.nix | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/pkgs/scripts/clip.nix b/pkgs/scripts/clip.nix index 862d82e..501bb3b 100644 --- a/pkgs/scripts/clip.nix +++ b/pkgs/scripts/clip.nix @@ -1,5 +1,12 @@ -{ lib ,writeShellScriptBin, gnome, xclip -, file, imagemagick, toPDF, ... }: +{ lib +, writeShellScriptBin +, gnome +, xclip +, file +, imagemagick +, toPDF +, ... +}: with lib; let name = if toPDF then "clip-pdf" else "clip"; @@ -13,13 +20,15 @@ with lib; let shift ''; - copyOut = if toPDF then '' - ${imagemagick}/bin/convert "$CLIP" "$OUT" - '' else '' - ${xclip}/bin/xclip -selection clipboard \ - -t $(${file}/bin/file -b --mime-type $CLIP) <"$CLIP" - ''; -in writeShellScriptBin name '' + copyOut = + if toPDF then '' + ${imagemagick}/bin/convert "$CLIP" "$OUT" + '' else '' + ${xclip}/bin/xclip -selection clipboard \ + -t $(${file}/bin/file -b --mime-type $CLIP) <"$CLIP" + ''; +in +writeShellScriptBin name '' ${pdfCmdline} OPTIONS=-a |
