diff --git a/bwzy-autofill b/bwzy-autofill index f790274..fcc40d1 100755 --- a/bwzy-autofill +++ b/bwzy-autofill @@ -5,21 +5,19 @@ read -r USER || USER="" read -r PASS || PASS="" read -r TOTP || TOTP="" -# Get the last active window -#LAST_WINDOW=$(hyprctl clients | grep ^Window | tail -n1 | awk '{print $2}') - -# Focus last window -$BWZY_REFOCUS_CMD - -# Hide bwzy -$BWZY_HIDE_CMD +type_sleep=45 +next_sleep=250 # Use wtype to output the USER and PASS -$BWZY_TYPE_CMD "$USER" -$BWZY_TYPE_CMD " " -$BWZY_TYPE_CMD "$PASS" -$BWZY_TYPE_CMD " " -$BWZY_TYPE_CMD $'\n' +$BWZY_TYPE_CMD \ + -d $type_sleep "$USER" \ + -s $next_sleep \ + -k tab \ + -s $next_sleep \ + -d $type_sleep "$PASS" \ + -s $next_sleep \ + -k return + [[ -n "$BWZY_NOTIFY_CMD" ]] && $BWZY_NOTIFY_CMD "user & pass autofilled" # Copy the TOTP to clipboard