diff options
author | 2025-06-03 14:02:17 -0400 | |
---|---|---|
committer | 2025-06-03 14:02:17 -0400 | |
commit | eb1fa89c2d0dafa21181ccbb6d79b8f8f90b6fc8 (patch) | |
tree | 3cf194f8ab61e761ad656d4e3f6a724bd1014daf /.local/bin/fuzzel-pass.sh | |
download | dotfiles-eb1fa89c2d0dafa21181ccbb6d79b8f8f90b6fc8.tar.gz dotfiles-eb1fa89c2d0dafa21181ccbb6d79b8f8f90b6fc8.zip |
Diffstat (limited to '.local/bin/fuzzel-pass.sh')
-rwxr-xr-x | .local/bin/fuzzel-pass.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/.local/bin/fuzzel-pass.sh b/.local/bin/fuzzel-pass.sh new file mode 100755 index 0000000..53ec999 --- /dev/null +++ b/.local/bin/fuzzel-pass.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +export PASSWORD_STORE_CLIP_TIME=10 + +shopt -s nullglob globstar + +prefix=${PASSWORD_STORE_DIR-~/.password-store} +password_files=( "$prefix"/**/*.gpg ) +password_files=( "${password_files[@]#"$prefix"/}" ) +password_files=( "${password_files[@]%.gpg}" ) + +password=$(printf '%s\n' "${password_files[@]}" | fuzzel --dmenu "$@") + +[[ -n $password ]] || exit + +pass show -c "$password" 2>/dev/null |