dotfiles/scripts/dmenu-pass
2023-05-29 12:39:14 -06:00

13 lines
384 B
Bash
Executable file

#!/bin/sh
# Script for 'pass'
# Ask for password name in vault
password=$(find ~/.password-store/ -type f -name '*.gpg' |
sed 's/.*\/\(.*\)\.gpg$/\1/' | dmenu -i -p "Password:")
# Exit if none chosen
[ -z "$password" ] && exit
# If chosen, use xdotool to type it
pass=$(pass show "$password" | head -1)
xdotool type "$pass" && notify-send "$password" "Successfully decrypted"