From 1b68eed7ef7c28e4257edd757848f4c4087e00f9 Mon Sep 17 00:00:00 2001
From: Filippo Valsorda <hi@filippo.io>
Date: Sun, 19 Apr 2020 18:41:25 -0400
Subject: [PATCH 1/2] platform/darwin: drop using "display" to show QR codes

This doesn't detect if XQuartz is installed and running, so it's broken
in most setups, the experience is poor regardless, since it's not
displayed inline in the terminal, but leaves a window that requires
closing, and anyway the the utf8 mode works perfectly on both iTerm2 and
Terminal.app.
---
 src/platform/darwin.sh | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/src/platform/darwin.sh b/src/platform/darwin.sh
index 342ecce..1222040 100644
--- a/src/platform/darwin.sh
+++ b/src/platform/darwin.sh
@@ -34,10 +34,6 @@ 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 -
 	else
 		echo -n "$1" | qrencode -t utf8
 	fi
-- 
2.26.1

