12 lines
370 B
Bash
Executable file
12 lines
370 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, copy to clipboard, and notify
|
|
pass show "$password" | head -1 | xsel -ib && notify-send " $password" "Copied to clipboard"
|