summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--home/home.nix13
1 files changed, 13 insertions, 0 deletions
diff --git a/home/home.nix b/home/home.nix
index be50d2d..6e18726 100644
--- a/home/home.nix
+++ b/home/home.nix
@@ -181,6 +181,19 @@
scp $argv[(seq 2 2 (expr $n + 1))].png flora:/var/lib/containers/pleroma/var/lib/akkoma/static/emoji/unsorted/
ssh flora machinectl shell pleroma /bin/sh -c \"pleroma_ctl emoji reload\"
'';
+ # source: https://notes.moira.is/Computer+Stuff/Useful+commands/Make+it+look+scanned
+ functions.scanify.body = ''
+ if [ (expr (count $argv) % 2) != 0 ]
+ echo usage: scanify input.pdf output.pdf
+ return 1
+ end
+ if [ test -e tmp.pdf ]
+ echo error: would override tmp.pdf
+ return 1
+ end
+ convert -density 150 $argv[1] -blur .1 -rotate .2 -attenuate .3 +noise gaussian tmp.pdf
+ gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer -dNOPAUSE -dQUIET -dBATCH -sOutputFile=$argv[2] tmp.pdf
+ '';
};
programs.kitty = {