#!/bin/bash current=$(setxkbmap -print | grep symbols) current=${current#*\+} current=${current%\+*} new=$( [[ $current == "us" ]] && echo "cz" || echo "us" ) setxkbmap $new echo "$current -> $new"