keylay (221B)
1 #!/bin/sh 2 3 var="$(setxkbmap -query | grep layout)" 4 var2="layout: us" 5 6 xdotool key Caps_Lock 7 8 if [ "$var" = "$var2" ] 9 then 10 setxkbmap -layout es 11 else 12 setxkbmap -layout us -variant altgr-intl -option nodeadkeys 13 fi