commit 1fc34e7c35fadf030bb970c3929a706d17d38155 parent 5eedeb66cc5fbb8108a0f74fd0dc1ab5978b826e Author: Anders Damsgaard <anders@adamsgaard.dk> Date: Wed, 9 Jan 2019 17:20:41 +0100 Add textqr script Diffstat:
A | links/bin/textqr | | | 47 | +++++++++++++++++++++++++++++++++++++++++++++++ |
1 file changed, 47 insertions(+), 0 deletions(-)
diff --git a/links/bin/textqr b/links/bin/textqr @@ -0,0 +1,47 @@ +#!/usr/bin/env bash + +pgrep -x dmenu && exit + +names="susan\nanders\nchristian\njesper\nsimon\nfar\nmor\nlars" +recipient=$(echo -e "${names[@]}" | dmenu -i -p "To:" || exit 1) + +case "$recipient" in + susan) + number="+4542742942" + ;; + anders) + number="+4542743142" + ;; + christian) + number="+4530246587" + ;; + jesper) + number="+4522257218" + ;; + simon) + number="+4551887891" + ;; + mor) + number="+4524971816" + ;; + far) + number="+4520752527" + ;; + lars) + number="+4560585688" + ;; + + *) + echo "Usage: ${0##*/} RECIPIENT MESSAGE" + exit 1 +esac + +message=$(echo "💬" | dmenu -i -p "Message:") || exit 1 + +qrencode -o - -s 1 \ + "$number $message" | + feh --auto-zoom \ + --fullscreen \ + --force-aliasing \ + --image-bg white \ + -