configuration/local/bin/xdopass

14 lines
364 B
Plaintext
Raw Normal View History

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-09-13 09:44:35 +02:00
key="$(cd ~/.password-store; find * -name "$key"'.*' | sed 's/\.gpg$//')"
2018-06-28 13:53:52 +02:00
xdotool type --clearmodifiers --window "$window" "$(pass show "$key" | head -1)"
2017-11-29 17:31:11 +01:00
xdotool windowfocus "$window"
2018-09-13 09:44:35 +02:00