aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRasmus Steinke <rasi@xssn.at>2017-10-03 04:54:48 +0200
committerRasmus Steinke <rasi@xssn.at>2017-10-03 04:54:48 +0200
commit3929c96c77bb578fa1cb3ddff21f4f3deab09e9e (patch)
treecccf2b2149564185d2c52782bf3722908f96baaf
parent6d469c55069e8a175b497fca99918c3982ede19e (diff)
downloadrofi-pass-1.5.2.tar.gz
make delay configurable and make sure it is always used. fixes and enhances #881.5.2
-rw-r--r--config.example3
-rwxr-xr-xrofi-pass15
2 files changed, 11 insertions, 7 deletions
diff --git a/config.example b/config.example
index 3078cc5..6a3013c 100644
--- a/config.example
+++ b/config.example
@@ -25,6 +25,9 @@ AUTOTYPE_field='autotype'
# delay to be used for :delay keyword
delay=2
+# rofi-pass needs to close itself before it can type passwords. Set delay here.
+wait=0.2
+
## Programs to be used
# Editor
EDITOR='gvim -f'
diff --git a/rofi-pass b/rofi-pass
index e9f211f..277259c 100755
--- a/rofi-pass
+++ b/rofi-pass
@@ -16,6 +16,7 @@ AUTOTYPE_field='autotype'
default_autotype="user :tab pass"
delay=2
+wait=0.2
default_do='menu' # menu, copyPass, typeUser, typePass, copyUser, copyUrl, viewEntry, typeMenu, actionMenu, copyMenu, openUrl
auto_enter='false'
notify='false'
@@ -341,9 +342,9 @@ Run ${default_do} with <span color='$help_color'>Enter</span>. For more help hit
# actions based on keypresses
case "${rofi_exit}" in
0) typeMenu;;
- 10) sleep 0.2; autopass;;
- 11) sleep 0.2; typeUser;;
- 12) sleep 0.2; typePass;;
+ 10) sleep $wait; autopass;;
+ 11) sleep $wait; typeUser;;
+ 12) sleep $wait; typePass;;
13) openURL;;
14) copyMenu;;
15) copyPass;;
@@ -402,13 +403,13 @@ typeMenu () {
fi
case "$typefield" in
"") exit;;
- "password") typePass;;
- "${AUTOTYPE_field}") autopass;;
- *) typeField
+ "password") sleep $wait; typePass;;
+ "${AUTOTYPE_field}") sleep $wait; autopass;;
+ *) sleep $wait; typeField
esac
clearUp
elif [[ $default_do == "${AUTOTYPE_field}" ]]; then
- autopass
+ sleep $wait; autopass
else
${default_do}
fi