2017-11-29 17:31:11 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
window="$(xdotool getwindowfocus)"
|
|
|
|
|
2018-08-13 14:02:54 +02:00
|
|
|
key="$(cd ~/.password-store; find * -name '*.gpg' -exec basename \{\} \; | sed 's/\.[^.]*$//' | dmenu)"
|
2017-11-29 17:31:11 +01:00
|
|
|
|
2018-06-28 13:53:52 +02:00
|
|
|
[ -z "$key" ] && exit
|
2017-11-29 17:31:11 +01:00
|
|
|
|
2018-06-28 13:53:52 +02:00
|
|
|
key="$(cd ~/.password-store; find * -name '*'"$key"'*' | sed 's/\.gpg$//')"
|
|
|
|
|
|
|
|
xdotool type --clearmodifiers --window "$window" "$(pass show "$key" | head -1)"
|
2017-11-29 17:31:11 +01:00
|
|
|
xdotool windowfocus "$window"
|