Compare commits
2 Commits
ff8414a888
...
9cf514009a
Author | SHA1 | Date |
---|---|---|
|
9cf514009a | |
|
1c80f5bd73 |
|
@ -5,8 +5,5 @@ set -e
|
||||||
|
|
||||||
key="$(bwpass | dmenu)"
|
key="$(bwpass | dmenu)"
|
||||||
[ -n "${key}" ] || exit 0
|
[ -n "${key}" ] || exit 0
|
||||||
password="$(bwpass show "${key}")"
|
bwpass show "${key}" | tr -d '\n' | xdotool type --file -
|
||||||
[ -n "${password}" ] || exit 1
|
xdotool key Return
|
||||||
printf '%s' "${password}" | xclip -quiet -rmlastnl -sel clip 2> /dev/null &
|
|
||||||
sleep 12
|
|
||||||
kill $!
|
|
||||||
|
|
|
@ -65,8 +65,9 @@ class Pinentry:
|
||||||
|
|
||||||
def getpin(self):
|
def getpin(self):
|
||||||
codec = locale.getpreferredencoding()
|
codec = locale.getpreferredencoding()
|
||||||
|
tty = os.ttyname(sys.stdin.fileno())
|
||||||
p = subprocess.Popen(
|
p = subprocess.Popen(
|
||||||
['pinentry'],
|
['pinentry', '-T', tty],
|
||||||
stdin=subprocess.PIPE,
|
stdin=subprocess.PIPE,
|
||||||
stdout=subprocess.PIPE,
|
stdout=subprocess.PIPE,
|
||||||
)
|
)
|
||||||
|
|
Reference in New Issue