mirror of
https://github.com/Adam-Ant/dotfiles
synced 2024-11-05 09:06:23 +00:00
13 lines
428 B
Bash
Executable File
13 lines
428 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
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[@]}" | rofi -dmenu -p "Password: " -bw 4 -i -width 80 -lines 3 -location 6 -no-custom -sync -yoffset -50 "$@")
|
|
|
|
[[ -n $password ]] || exit
|
|
|
|
pass show -c "$password" 2>/dev/null
|