revamp run sh
This commit is contained in:
15
arch-user/bin/bemenu/run-pass.sh
Executable file
15
arch-user/bin/bemenu/run-pass.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
type="$1"
|
||||
shift
|
||||
|
||||
cd "$PASSWORD_STORE_DIR"
|
||||
pws="$(find -path "*/.*" -prune -o -path "*/cred/*" -name "*.gpg" -printf '%P\n' | sed 's/\.gpg$//')"
|
||||
pw="$(echo "$pws" | bemenu --prompt "pass")"
|
||||
|
||||
case "$type" in
|
||||
otp) pass otp -c "$pw" && notify-send "$pw" -a pass "OTP copied to clipboard, clears in 45s";;
|
||||
*) pass -c "$pw" && notify-send "$pw" -a pass "Password copied to clipboard, clears in 45s";;
|
||||
esac
|
||||
|
||||
Reference in New Issue
Block a user