configuration/local/bin/xdopass

12 lines
274 B
Plaintext
Raw Normal View History

2017-11-29 17:31:11 +01:00
#!/bin/bash
window="$(xdotool getwindowfocus)"
2019-10-16 14:43:25 +02:00
key="$(cd ~/.password-store; find * -name '*.gpg' | sed 's/\.gpg$//' | sort -d | 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
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