configuration/local/bin/xdopass
2018-08-13 14:04:13 +02:00

13 lines
365 B
Bash
Executable File

#!/bin/bash
window="$(xdotool getwindowfocus)"
key="$(cd ~/.password-store; find * -name '*.gpg' -exec basename \{\} \; | sed 's/\.[^.]*$//' | dmenu)"
[ -z "$key" ] && exit
key="$(cd ~/.password-store; find * -name '*'"$key"'*' | sed 's/\.gpg$//')"
xdotool type --clearmodifiers --window "$window" "$(pass show "$key" | head -1)"
xdotool windowfocus "$window"