aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Neumann <alexander@bumpern.de>2017-04-21 09:24:01 +0200
committerAlexander Neumann <alexander@bumpern.de>2017-04-21 09:24:01 +0200
commite719871bf760cba98195d2f02a95cee39f8e21f2 (patch)
treebd53de09428b3683d6b2a61f26941af91a339e57
parent7de84807383accda66c9dd172a53908d37cfbb83 (diff)
downloadrofi-pass-e719871bf760cba98195d2f02a95cee39f8e21f2.tar.gz
Disable keyboard repeat for autopass
This commit disables keyboard auto repeat during automatic password entry with xdotool, and reenables auto repeat afterwards only if it was enabled before. This procedure reduces accidentally repeated keys a lot. Closes #67
-rwxr-xr-xrofi-pass7
1 files changed, 7 insertions, 0 deletions
diff --git a/rofi-pass b/rofi-pass
index 59172f8..0900477 100755
--- a/rofi-pass
+++ b/rofi-pass
@@ -75,6 +75,9 @@ checkIfPass () {
autopass () {
+ x_repeat_enabled=$(xset q | awk '/auto repeat:/ {print $3}')
+ xset r off
+
rm -f "$HOME/.cache/rofi-pass/last_used"
echo "${root}: $selected_password" > "$HOME/.cache/rofi-pass/last_used"
if [[ -z "${stuff["$AUTOTYPE_field"]}" ]]; then
@@ -107,6 +110,10 @@ autopass () {
xdotool key Return
fi
fi
+
+ xset r "$x_repeat_enabled"
+ unset x_repeat_enabled
+
clearUp
}