cool fzf password scripts

This commit is contained in:
tavo-wasd 2023-05-23 10:56:23 -06:00
parent 90d7b7fbc5
commit b12d763a87
2 changed files with 23 additions and 0 deletions

11
scripts/fzf-otp Executable file
View file

@ -0,0 +1,11 @@
#!/bin/sh
# OTP script for 'pass'
# Ask for password name in vault
password=$(find ~/.password-store/ -type f -name '*.gpg' | sed 's/.*\/\(.*\)\.gpg$/\1/' | fzf)
# Exit if none chosen
[ -z "$password" ] && exit
# Otherwise, copy to clipboard and notify OTP
pass otp "$password"

12
scripts/fzf-pass Executable file
View file

@ -0,0 +1,12 @@
#!/bin/sh
# Script for 'pass'
# Ask for password name in vault
password=$(find ~/.password-store/ -type f -name '*.gpg' |
sed 's/.*\/\(.*\)\.gpg$/\1/' | fzf)
# Exit if none chosen
[ -z "$password" ] && exit
# If chosen, copy to clipboard, and notify
pass show "$password"