From 4effe64953544a6a50ded3261366d74e63256af2 Mon Sep 17 00:00:00 2001 From: Nils Goroll Date: Wed, 8 Mar 2023 13:25:12 +0100 Subject: [PATCH] Extend example for QR code parsind to X11 also --- README.md | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index bdd724b..d9de156 100644 --- a/README.md +++ b/README.md @@ -78,13 +78,20 @@ The same, but appending to an existing passfile: $ zbarimg -q --raw google-qrcode.png | pass otp append google/example@gmail.com ``` -If you have a clipboard management console tool such as `wl-clipboard` for -Wayland installed, you can also select "Copy Image" in your favorite browser -and run: +You can also select "Copy Image" in your favorite browser or take a +screenshot of the QR code and run: -``` -$ wl-paste | zbarimg -q --raw - | pass otp append google/example@gmail.com -``` +* With Wayland: + + ``` + $ wl-paste | zbarimg -q --raw - | pass otp append google/example@gmail.com + ``` + +* With X11: + + ``` + $ xclip -selection clipboard -o -target image/png | zbarimg -q --raw - | pass otp append google/example@gmail.com + ``` Generate a 2FA code using this token: