summaryrefslogtreecommitdiff
path: root/.local/bin
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2023-10-13 03:48:31 +0200
committerThomas Voss <mail@thomasvoss.com> 2023-10-13 03:48:31 +0200
commitb0e3ff5e7ca199342bcd4afc46caf3ac1cb5c48e (patch)
tree9435a20bb5ed7b94c091f6d26669263af8a6d09c /.local/bin
parent67b8204380cf52b5e9df6e7a7648293ee3b3a416 (diff)
lps: Add script for scanning documents
Diffstat (limited to '.local/bin')
-rwxr-xr-x.local/bin/lps9
1 files changed, 9 insertions, 0 deletions
diff --git a/.local/bin/lps b/.local/bin/lps
new file mode 100755
index 0000000..135848d
--- /dev/null
+++ b/.local/bin/lps
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+set -e
+
+flags='-m color -r 300'
+[ $# -eq 1 ] && flags="$flags --area=0,0,$1,$1"
+
+uri="$(lpoptions | sed -E 's/.*device-uri=hp:([^ ]+).*/hpaio:\1/')"
+chronic hp-scan -d "$uri" $flags