summaryrefslogtreecommitdiff
path: root/.local/bin
diff options
context:
space:
mode:
Diffstat (limited to '.local/bin')
-rwxr-xr-x.local/bin/passmenu16
-rwxr-xr-x.local/bin/qrscan9
2 files changed, 16 insertions, 9 deletions
diff --git a/.local/bin/passmenu b/.local/bin/passmenu
index b2f41cb..385cf42 100755
--- a/.local/bin/passmenu
+++ b/.local/bin/passmenu
@@ -1,13 +1,11 @@
-#!/bin/sh
-
#!/usr/bin/env bash
shopt -s nullglob globstar
typeit=0
if [[ $1 == "--type" ]]; then
- typeit=1
- shift
+ typeit=1
+ shift
fi
prefix=${PASSWORD_STORE_DIR-~/.password-store}
@@ -21,12 +19,12 @@ password=$(printf '%s\n' "${password_files[@]}" | dmenu "$@")
pass_cmd=show
if pass show "$password" | grep -q '^otpauth://'; then
- pass_cmd=otp
+ pass_cmd=otp
fi
if [[ $typeit -eq 0 ]]; then
- pass $pass_cmd -c "$password" 2>/dev/null
- else
- pass $pass_cmd "$password" | { IFS= read -r pass; printf %s "$pass"; } |
- xdotool type --clearmodifiers --file -
+ pass $pass_cmd -c "$password" 2>/dev/null
+else
+ pass $pass_cmd "$password" | { IFS= read -r pass; printf %s "$pass"; } |
+ xdotool type --clearmodifiers --file -
fi
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