RetroFed Forum
Your home away from modern life.
Select a QR code on the screen, and copy the value into your clipboard
Post Reply
AuthorMessage
[object Object] sh.itjust.works Object@sh.itjust.works
Joined: 2024-09-22
Quote

Requirements: Wayland environment with slurp, grim, zbarimg installed

selected_area=$(slurp) && grim -g "$selected_area" - | zbarimg - | tee >(notify-desktop "QR Code Captured" "$(cat)") | wl-copy;

Explanation:

selected_area=$(slurp) && grim -g "$selected_area" - | # User selects an area and grim takes screenshot of it
  zbarimg - | # QR code value is extracted from it
  tee >(notify-desktop "QR Code Captured" "$(cat)") | # Copy the output and make a notification out of it
  wl-copy; # Also add the value to your clipboard
1   Original
Post Reply
Back to top