This repository has been archived on 2024-03-28. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/bin/pass-chooser

15 lines
342 B
Bash
Executable file

#!/usr/bin/env sh
# TODO: can we use fzfp here?
floating-term \
bash -c "
cd $HOME/.password-store
fd gpg |
sd '.gpg\$' '' |
fzf --height 100% --prompt 'fzf-pass> ' > /tmp/fzfp-key
pass \"\$(cat /tmp/fzfp-key)\" |
head -n 1 |
sd '\s+\$' '' |
nohup clip &>/dev/null &
notify-send -a 'pass' 'Password in Clipboard'
"