diff options
author | Patrick Simianer <pks@pks.rocks> | 2019-07-28 16:45:22 +0200 |
---|---|---|
committer | Patrick Simianer <pks@pks.rocks> | 2019-07-28 16:45:22 +0200 |
commit | dcab8f4a4bd154c708faaeed75a2c23727cae2cc (patch) | |
tree | aa110fd7eb810c8c622e155dcde4ee8c9edb3d8c | |
parent | 4f142da74e5091a8681ea34e8259e69d22ffe574 (diff) |
layout-switch: toggle between us de and ru
-rwxr-xr-x | layout-switch | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/layout-switch b/layout-switch index fdc6b65..256eeb2 100755 --- a/layout-switch +++ b/layout-switch @@ -2,13 +2,18 @@ CUR_US=$(setxkbmap -print | grep xkb_symbols | grep -o "+us+") CUR_RU=$(setxkbmap -print | grep xkb_symbols | grep -o "+ru+") +CUR_DE=$(setxkbmap -print | grep xkb_symbols | grep -o "+de+") -if [[ $CUR_US == "" ]]; then - setxkbmap us -fi - -if [[ $CUR_RU == "" ]]; then +# us > de > ru +if [[ $CUR_US == "+us+" ]]; then + setxkbmap de + ratpoison -c "echo keyboard map DE" +elif [[ $CUR_DE == "+de+" ]]; then setxkbmap ru + ratpoison -c "echo keyboard map RU" +elif [[ $CUR_RU == "+ru+" ]]; then + setxkbmap us + ratpoison -c "echo keyboard map US" fi setxkbmap -option |