df66e00727
If in Wayland, the "bemenu" alternative should be used instead of "dmenu" or "rofi".
15 lines
392 B
Bash
Executable File
15 lines
392 B
Bash
Executable File
#!/usr/bin/env 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[@]}" | "$HOME/.config/wm_scripts/menucmd" "$@")
|
|
|
|
[[ -n $password ]] || exit
|
|
|
|
pass show -c "$password" 2>/dev/null
|