From 375d4b79931fa7b407d25aaba0917a5cc0469d3b Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Mon, 14 Oct 2024 21:34:34 +0200 Subject: decode-barcode: Use flameshot instead of scrot Signed-off-by: Florian Pritz --- decode-barcode | 9 +++++++-- 1 file 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" -- cgit v1.2.3-24-g4f1b