From 6e30aaa633f8c912888a07cf17a2008c36ec875b Mon Sep 17 00:00:00 2001 From: Jonathan Hodgson Date: Mon, 7 Feb 2022 12:29:52 +0000 Subject: [PATCH] Adds qr code decode to act on last --- bin/.bin/dmenu/actOnLast | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/bin/.bin/dmenu/actOnLast b/bin/.bin/dmenu/actOnLast index acec8499..98c4b1f1 100755 --- a/bin/.bin/dmenu/actOnLast +++ b/bin/.bin/dmenu/actOnLast @@ -32,6 +32,7 @@ getSuggestions(){ screenshot) printf "View\tsxiv\n" printf "add shadow\tscreenshotAddShadow\n" + printf "Decode QR Code\tscreenshotQRCode\n" printf "OCR\tscreenshotOCR\n" printf "Clipboard\tscreenshotClipboard\n" ;; @@ -89,6 +90,14 @@ screenshotClipboard(){ } +screenshotQRCode(){ + file="$1" + zbarimg "$file" > "$file.txt" + head -n 1 "$file.txt" | xclip -selection clipboard + echo -n "$file.txt" | xclip -selection primary + notify-send "QR code" "Decoded" +} + passwordOTP(){ password-manager "$1" otp }