aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRasmus Steinke <rasi@xssn.at>2015-08-23 23:28:45 +0200
committerRasmus Steinke <rasi@xssn.at>2015-08-23 23:28:45 +0200
commit4dfe3c305cd9b5dcd82e10d2cef3c775dd0c17a0 (patch)
tree1c5ebf392b6b86ba8ed0a9bdb8c95e2bd323b7c5
parentb2b533b03812337d2fd1fbb8f80b92d64797011e (diff)
downloadrofi-pass-4dfe3c305cd9b5dcd82e10d2cef3c775dd0c17a0.tar.gz
add possiblity to re-open showEntry after autotyping
-rw-r--r--config.example4
-rwxr-xr-xrofi-pass10
2 files changed, 14 insertions, 0 deletions
diff --git a/config.example b/config.example
index e531422..2bf0bfc 100644
--- a/config.example
+++ b/config.example
@@ -24,6 +24,10 @@ BROWSER='chromium'
help_color='#0C73C2'
auto_enter='false'
+# seconds to wait before re-opening showEntry-menu
+# after autotyping an entry. Set to "off" to disable
+count=2
+
# Clipboard settings
# Possible options: primary, clipboard, both
clip=primary
diff --git a/rofi-pass b/rofi-pass
index 11450a6..c9896e1 100755
--- a/rofi-pass
+++ b/rofi-pass
@@ -21,6 +21,10 @@ if [[ -z $BROWSER ]]; then
export BROWSER=xdg-open
fi
+if [[ -z ${count} ]]; then
+ count=2
+fi
+
# check if alternative root directory was given on commandline
if [[ $1 == "--last-used" || $1 == "--show-last" ]]; then
root=$(awk -F ': ' '{ print $1 }' $HOME/.config/rofi-pass/last_used)
@@ -261,6 +265,12 @@ showEntry () {
xdotool key ctrl+alt
fi
fi
+ if [[ ${count} == "off" ]]; then
+ exit
+ else
+ sleep ${count}
+ fi
+ showEntry
elif [[ ${rofi_exit} -eq 1 ]]; then
exit
fi