From 9ede089b7ea79ccc34027d5e99356ecde7c95090 Mon Sep 17 00:00:00 2001 From: openoms Date: Thu, 19 Aug 2021 10:31:10 +0100 Subject: [PATCH] add at he qr shortcut to _commands.sh --- home.admin/_commands.sh | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/home.admin/_commands.sh b/home.admin/_commands.sh index 954fc6c0b..109b8fc27 100755 --- a/home.admin/_commands.sh +++ b/home.admin/_commands.sh @@ -367,4 +367,19 @@ function notifyme() { function whitepaper() { cd /home/admin/config.scripts ./bonus.whitepaper.sh on -} \ No newline at end of file +} + +# command: qr ["string"] +# shows a QR code from the string +function qr() { + if [ ${#1} -eq 0 ]; then + echo "# Error='missing string'" + fi + echo + echo "Displaying the text:" + echo "$1" + echo + qrencode -t ANSIUTF8 "${1}" + echo "(To shrink QR code: MacOS press CMD- / Linux press CTRL-)" + echo +}