qrshot

Decode QR code on screen, or encode a string then echo QR code on terminal, on Linux
git clone git://git.janpasierb.com/qrshot.git
Log | Files | Refs | README

qrshot (267B)


      1 #!/bin/bash
      2 
      3 if [[ ! "$1" ]]; then
      4 
      5     TMPDIR=/dev/shm
      6     cd "$TMPDIR"
      7 
      8     echo Use mouse select an area on screen to decode QR
      9     echo ""
     10 
     11     scrot -s -e 'echo Image size $w x $h ; echo "" ; zbarimg "$f" ; rm  "$f" '
     12 
     13 else
     14     qrencode -m 2 -t ANSIUTF8 "$1"
     15 fi