#!/bin/sh LAYOUT=$(setxkbmap -query | grep layout | grep -oP "gb|ru") if [ $LAYOUT = 'gb' ] ; then setxkbmap ru else setxkbmap gb fi