There is xkb-switch which is described thus:
xkb-switch is a C++ program that allows to query and change the XKB layout state.
There is xkb-switch which is described thus:
xkb-switch is a C++ program that allows to query and change the XKB layout state.