2
submitted 10 months ago* (last edited 10 months ago) by Object@sh.itjust.works to c/bashing@sh.itjust.works

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
no comments (yet)
sorted by: hot top new old
there doesn't seem to be anything here
this post was submitted on 15 Jan 2026
2 points (100.0% liked)

BASHing

51 readers
1 users here now

Share your bash scripts here!

founded 10 months ago
MODERATORS