mirror of
https://github.com/balkian/dotfiles.git
synced 2024-11-17 01:52:29 +00:00
20 lines
385 B
Bash
Executable File
20 lines
385 B
Bash
Executable File
#!/bin/bash
|
|
|
|
shopt -s nullglob globstar
|
|
|
|
|
|
if command -v rofi >/dev/null 2>&1;
|
|
then
|
|
program="rofi -dmenu"
|
|
else
|
|
program="dmenu"
|
|
fi
|
|
|
|
password_files=( ~/.password-store/**/*.gpg )
|
|
password_files=( "${password_files[@]##*/.password-store/}" )
|
|
password_files=( "${password_files[@]%.gpg}" )
|
|
|
|
password=$(printf '%s\n' "${password_files[@]}" | $program "$@")
|
|
|
|
pass show -c "$password"
|