dmenu_bw: Type password instead of copying it
Auto-typing the password, instead of copying it to the clipboard, is more secure, since any process can read the contents of the clipboard. It is also significantly more convenient, avoiding the paste step, and works in situations where pasting isn't possible (such as into a VM console).master
parent
ff8414a888
commit
1c80f5bd73
|
@ -5,8 +5,5 @@ set -e
|
|||
|
||||
key="$(bwpass | dmenu)"
|
||||
[ -n "${key}" ] || exit 0
|
||||
password="$(bwpass show "${key}")"
|
||||
[ -n "${password}" ] || exit 1
|
||||
printf '%s' "${password}" | xclip -quiet -rmlastnl -sel clip 2> /dev/null &
|
||||
sleep 12
|
||||
kill $!
|
||||
bwpass show "${key}" | tr -d '\n' | xdotool type --file -
|
||||
xdotool key Return
|
||||
|
|
Reference in New Issue