diff options
author | Saumit Dinesan <justsaumit@protonmail.com> | 2022-03-30 22:44:27 +0530 |
---|---|---|
committer | Saumit Dinesan <justsaumit@protonmail.com> | 2022-03-30 22:44:27 +0530 |
commit | d66b219ef401962f36f2242823e9686966c003e5 (patch) | |
tree | b94b825646ea980a401ccf363ec9fc7aae3b1ece /.local/bin/qrscan | |
parent | d3c6b05361cb177e2da1c5961aa82e1da42eb412 (diff) |
using qrscan as a binary rather than alias
Diffstat (limited to '.local/bin/qrscan')
-rwxr-xr-x | .local/bin/qrscan | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/.local/bin/qrscan b/.local/bin/qrscan new file mode 100755 index 0000000..dcd3983 --- /dev/null +++ b/.local/bin/qrscan @@ -0,0 +1,9 @@ +#!/bin/sh + +if [ -z "$1" ]; then + echo "Enter a valid image with QR code" +else + Link=$(zbarimg -q $1 | cut -b 1-8 --complement) && + echo $Link | xclip -sel c + notify-send "QR Link copied to clipboard" "$Link" +fi |