diff options
author | Alexander Neumann <alexander@bumpern.de> | 2017-04-21 09:24:01 +0200 |
---|---|---|
committer | Alexander Neumann <alexander@bumpern.de> | 2017-04-21 09:24:01 +0200 |
commit | e719871bf760cba98195d2f02a95cee39f8e21f2 (patch) | |
tree | bd53de09428b3683d6b2a61f26941af91a339e57 | |
parent | 7de84807383accda66c9dd172a53908d37cfbb83 (diff) | |
download | rofi-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-x | rofi-pass | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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 } |