switched to pass some time ago

This commit is contained in:
Felix Van der Jeugt 2018-06-28 13:53:52 +02:00
parent 31284e1049
commit f167902156
No known key found for this signature in database
GPG Key ID: 58B209295023754D

View File

@ -2,10 +2,11 @@
window="$(xdotool getwindowfocus)"
alias_="$(zenity --password --title="Password Calculator - Alias" 2> /dev/null)"
secret="$(zenity --password --title="Password Calculator - Secret" 2> /dev/null)"
key="$(cd ~/.password-store; find * -name '*.gpg' -exec basename \{\} \; | sed 's/\..*$//' | dmenu)"
pass="$(echo -n "$secret$alias_" | shasum | sed 's/../\\\\x&/g' | xargs echo -e | base64 -w16 | head -1)"
[ -z "$key" ] && exit
xdotool type --window "$window" "$pass"
key="$(cd ~/.password-store; find * -name '*'"$key"'*' | sed 's/\.gpg$//')"
xdotool type --clearmodifiers --window "$window" "$(pass show "$key" | head -1)"
xdotool windowfocus "$window"