diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2017-01-18 20:41:08 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2017-01-18 20:41:08 -0200 |
commit | 2c121523b3b3a8a299ab1c34cc154c42c040fecd (patch) | |
tree | 1190e6db502205bb642474423704143d34c1594e /qrpaste | |
parent | 93256841deaf8771a07ce853987f178b04c795d5 (diff) | |
download | utils-x11-2c121523b3b3a8a299ab1c34cc154c42c040fecd.tar.gz utils-x11-2c121523b3b3a8a299ab1c34cc154c42c040fecd.tar.bz2 |
Adds qrpaste
Diffstat (limited to 'qrpaste')
-rwxr-xr-x | qrpaste | 25 |
1 files changed, 25 insertions, 0 deletions
@@ -0,0 +1,25 @@ +#!/bin/bash +# +# Display clipboard content into as qrcode +# + +# Setup +BASENAME="`basename $0`" +TEMP="`mktemp -d`" +OUT="$TEMP/clipboard.png" + +# Check +if ! which qrencode &> /dev/null; then + echo "$BASENAME: qrencode not found" + exit 1 +elif ! which xclip &> /dev/null; then + echo "$BASENAME: xclip not found" + exit 1 +fi + +# Run +qrencode -o "$OUT" "`xclip -o`" +display $OUT + +# Teardown +rm -rf $TEMP |