[PATCH 1/2] On macOS, use Preview.app to generate qr code
ritewhose
ritewhose at gmail.com
Fri Mar 3 05:52:42 CET 2017
---
src/platform/darwin.sh | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/platform/darwin.sh b/src/platform/darwin.sh
index 86eb325..a9987b0 100644
--- a/src/platform/darwin.sh
+++ b/src/platform/darwin.sh
@@ -34,10 +34,8 @@ tmpdir() {
qrcode() {
if type imgcat >/dev/null 2>&1; then
echo -n "$1" | qrencode --size 10 -o - | imgcat
- elif type gm >/dev/null 2>&1; then
- echo -n "$1" | qrencode --size 10 -o - | gm display -title "pass: $2" -geometry +200+200 -
- elif type display >/dev/null 2>&1; then
- echo -n "$1" | qrencode --size 10 -o - | display -title "pass: $2" -geometry +200+200 -
+ if open -Ra Preview.app; then
+ echo -n "$1" | qrencode --size 10 -o - | open -f -a Preview.app
else
echo -n "$1" | qrencode -t utf8
fi
--
2.12.0
More information about the Password-Store
mailing list