From 3f265a3c255eac69e8d79cb41aacb3496917e2ed Mon Sep 17 00:00:00 2001 From: Jonathan Hodgson Date: Thu, 3 Sep 2020 17:08:46 +0100 Subject: [PATCH] Makes password manager change keyboard layout when inserting --- bin/.bin/dmenu/password-manager | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bin/.bin/dmenu/password-manager b/bin/.bin/dmenu/password-manager index 83d4bded..25ef9e2d 100755 --- a/bin/.bin/dmenu/password-manager +++ b/bin/.bin/dmenu/password-manager @@ -10,7 +10,14 @@ function type_password(){ exit 1 fi sleep 1 + # xdotool doesn't appear to like it if I am uring colemak + # To get around that, switch back to normal + setxkbmap -layout gb echo "$pw" | xdotool type --clearmodifiers --file - + # Then revert back to colemak + setxkbmap -layout gb,gb -variant "colemak," -option grp:shifts_toggle + xset r rate 200 70 + xinput --list | grep -Ei 'ErgoDox EZ\s+id' | grep -oE 'id=[0-9]+' | cut -d'=' -f2 | xargs -r setxkbmap -layout gb -device } function copy_password(){ local password="$1"