From 0aa9a9631c6bee0a2578c7caa43d0b5f0e0a5f8a Mon Sep 17 00:00:00 2001 From: tavo-wasd Date: Mon, 2 Oct 2023 16:57:09 -0600 Subject: [PATCH] more features --- scripts/zbarimg-scan-barcode | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/zbarimg-scan-barcode b/scripts/zbarimg-scan-barcode index 4001a4d..6c2ff5b 100755 --- a/scripts/zbarimg-scan-barcode +++ b/scripts/zbarimg-scan-barcode @@ -1,7 +1,12 @@ #!/bin/sh scrot -s "$HOME/.local/cache/barcode-%Y-%m-%d.png" || exit -zbarimg -q "$HOME/.local/cache/barcode-"* +OUTPUT="$(zbarimg -q "$HOME/.local/cache/barcode-"*)" +OUTPUT="${OUTPUT##QR-Code:}" + +echo -n "$OUTPUT" | xsel -ib +echo "$OUTPUT" +notify-send -u low "QR code" "'$OUTPUT' copied to clipboard" # Delete created files rm -rf $HOME/.local/cache/barcode-*.png