#!/bin/sh CURRENTLAYOUT=$(setxkbmap -print | awk -F"+" '/xkb_symbols/ {print $2}') case "$CURRENTLAYOUT" in pt) setxkbmap us ;; us) setxkbmap pt esac setxkbmap -option caps:super