summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xlayout-switch15
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