summaryrefslogtreecommitdiff
path: root/.local/bin/passmenu
diff options
context:
space:
mode:
authorSaumit Dinesan <justsaumit@protonmail.com>2022-03-30 22:44:27 +0530
committerSaumit Dinesan <justsaumit@protonmail.com>2022-03-30 22:44:27 +0530
commitd66b219ef401962f36f2242823e9686966c003e5 (patch)
treeb94b825646ea980a401ccf363ec9fc7aae3b1ece /.local/bin/passmenu
parentd3c6b05361cb177e2da1c5961aa82e1da42eb412 (diff)
using qrscan as a binary rather than alias
Diffstat (limited to '.local/bin/passmenu')
-rwxr-xr-x.local/bin/passmenu16
1 files changed, 7 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