add pass menu for wofi

This commit is contained in:
Anthony Rodriguez 2023-06-21 10:27:55 +02:00
parent 50e9a9c168
commit f820d95db8
No known key found for this signature in database
GPG key ID: 133EACC7CCC7D17F

15
scripts/.scripts/passwmenu Executable file
View file

@ -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