summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2024-10-14 21:34:34 +0200
committerFlorian Pritz <bluewind@xinu.at>2024-10-14 21:54:03 +0200
commit375d4b79931fa7b407d25aaba0917a5cc0469d3b (patch)
tree398b6eff615d2ac22f47255e7a0659646bfc5a24
parentd5ffb01d87852eb74f6b17ae06ac0c476010065b (diff)
downloadbin-375d4b79931fa7b407d25aaba0917a5cc0469d3b.tar.gz
bin-375d4b79931fa7b407d25aaba0917a5cc0469d3b.tar.xz
decode-barcode: Use flameshot instead of scrot
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rwxr-xr-xdecode-barcode9
1 files changed, 7 insertions, 2 deletions
diff --git a/decode-barcode b/decode-barcode
index 4d16780..29ae8ce 100755
--- a/decode-barcode
+++ b/decode-barcode
@@ -1,4 +1,9 @@
#!/bin/sh
-file=$(scrot -s -e 'echo $f')
+dir=$(mktemp --tmpdir -d)
+trap "rm -rf '$dir'" EXIT INT TERM
+
+file=$(mktemp --tmpdir="$dir" screenshot-XXXX.png)
+
+flameshot gui --accept-on-select -r > "$file"
+
zbarimg --raw $file
-rm "$file"