Skip to content

Commit 3929c96

Browse files
committed
make delay configurable and make sure it is always used. fixes and enhances #88
1 parent 6d469c5 commit 3929c96

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

config.example

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ AUTOTYPE_field='autotype'
2525
# delay to be used for :delay keyword
2626
delay=2
2727

28+
# rofi-pass needs to close itself before it can type passwords. Set delay here.
29+
wait=0.2
30+
2831
## Programs to be used
2932
# Editor
3033
EDITOR='gvim -f'

rofi-pass

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ AUTOTYPE_field='autotype'
1616

1717
default_autotype="user :tab pass"
1818
delay=2
19+
wait=0.2
1920
default_do='menu' # menu, copyPass, typeUser, typePass, copyUser, copyUrl, viewEntry, typeMenu, actionMenu, copyMenu, openUrl
2021
auto_enter='false'
2122
notify='false'
@@ -341,9 +342,9 @@ Run ${default_do} with <span color='$help_color'>Enter</span>. For more help hit
341342
# actions based on keypresses
342343
case "${rofi_exit}" in
343344
0) typeMenu;;
344-
10) sleep 0.2; autopass;;
345-
11) sleep 0.2; typeUser;;
346-
12) sleep 0.2; typePass;;
345+
10) sleep $wait; autopass;;
346+
11) sleep $wait; typeUser;;
347+
12) sleep $wait; typePass;;
347348
13) openURL;;
348349
14) copyMenu;;
349350
15) copyPass;;
@@ -402,13 +403,13 @@ typeMenu () {
402403
fi
403404
case "$typefield" in
404405
"") exit;;
405-
"password") typePass;;
406-
"${AUTOTYPE_field}") autopass;;
407-
*) typeField
406+
"password") sleep $wait; typePass;;
407+
"${AUTOTYPE_field}") sleep $wait; autopass;;
408+
*) sleep $wait; typeField
408409
esac
409410
clearUp
410411
elif [[ $default_do == "${AUTOTYPE_field}" ]]; then
411-
autopass
412+
sleep $wait; autopass
412413
else
413414
${default_do}
414415
fi

0 commit comments

Comments
 (0)