diff options
author | Florian Pritz <bluewind@xinu.at> | 2024-10-14 21:34:34 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2024-10-14 21:54:03 +0200 |
commit | 375d4b79931fa7b407d25aaba0917a5cc0469d3b (patch) | |
tree | 398b6eff615d2ac22f47255e7a0659646bfc5a24 /decode-barcode | |
parent | d5ffb01d87852eb74f6b17ae06ac0c476010065b (diff) | |
download | bin-375d4b79931fa7b407d25aaba0917a5cc0469d3b.tar.gz bin-375d4b79931fa7b407d25aaba0917a5cc0469d3b.tar.xz |
decode-barcode: Use flameshot instead of scrot
Signed-off-by: Florian Pritz <bluewind@xinu.at>
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" |