diff options
author | Patrick Simianer <p@simianer.de> | 2014-11-14 15:54:34 +0100 |
---|---|---|
committer | Patrick Simianer <p@simianer.de> | 2014-11-14 15:54:34 +0100 |
commit | 2b90e6bb1761f7181e255aed0590ea5296a1e4e4 (patch) | |
tree | 1e2dcb34f4c7743716f6f9b43e75f4ce9e95b57f | |
parent | cebc5e213fa5a27e1fffa73642f96337e8feb7a1 (diff) |
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 + |