dont send tab when no username field exists in password file - fixed #37

This commit is contained in:
Rasmus Steinke 2016-05-19 19:54:41 +02:00
parent 81e07bb8a2
commit 9ff6e333ab

View File

@ -41,8 +41,10 @@ autopass () {
rm -f "/tmp/$USER-rofi-pass/last_used"
echo "${root}: $selected_password" > "/tmp/$USER-rofi-pass/last_used"
if [[ -z "${stuff["$AUTOTYPE_field"]}" ]]; then
echo -n "${stuff["${USERNAME_field}"]}" | xdotool type --clearmodifiers --file -
xdotool key Tab
if [[ "${stuff["${USERNAME_field}"]}" ]]; then
echo -n "${stuff["${USERNAME_field}"]}" | xdotool type --clearmodifiers --file -
xdotool key Tab
fi
echo -n "${password}" | xdotool type --clearmodifiers --file -
sleep 1
if [[ ${auto_enter} == "true" ]]; then xdotool key Return; fi