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

16 lines
342 B
Plaintext
Raw Normal View History

2020-05-18 15:34:35 -05:00
#!/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'
"