diff options
Diffstat (limited to 'decode-barcode')
-rwxr-xr-x | decode-barcode | 9 |
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" |