From 2b90e6bb1761f7181e255aed0590ea5296a1e4e4 Mon Sep 17 00:00:00 2001 From: Patrick Simianer
Date: Fri, 14 Nov 2014 15:54:34 +0100 Subject: layout_switch --- layout_switch | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 layout_switch 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 + -- cgit v1.2.3