diff options
Diffstat (limited to 'layout-switch')
-rwxr-xr-x | layout-switch | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/layout-switch b/layout-switch new file mode 100755 index 0000000..fdc6b65 --- /dev/null +++ b/layout-switch @@ -0,0 +1,16 @@ +#!/bin/zsh -x + +CUR_US=$(setxkbmap -print | grep xkb_symbols | grep -o "+us+") +CUR_RU=$(setxkbmap -print | grep xkb_symbols | grep -o "+ru+") + +if [[ $CUR_US == "" ]]; then + setxkbmap us +fi + +if [[ $CUR_RU == "" ]]; then + setxkbmap ru +fi + +setxkbmap -option +xmodmap ~/.Xmodmap + |