diff --git a/scripts/.scripts/passwmenu b/scripts/.scripts/passwmenu new file mode 100755 index 0000000..2e2b14e --- /dev/null +++ b/scripts/.scripts/passwmenu @@ -0,0 +1,15 @@ +#!/bin/bash + +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[@]}" | wofi --dmenu "$@") + +[[ -n $password ]] || exit + +pass show "$password" -c +