Created
November 19, 2023 20:49
-
-
Save ztrayner/6ae6532efcac10ff423c1ba54fcb721d to your computer and use it in GitHub Desktop.
Generate and copy qr code to clipboard on mac
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias qrgen='function _qrgen(){ | |
local tmpfile="${HOME}/Downloads/qrcode.png" | |
qrencode -o "$tmpfile" "$*" | |
osascript -e "set the clipboard to (read (POSIX file \"${tmpfile}\") as JPEG picture)" | |
rm "$tmpfile" | |
}; _qrgen' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment