I'm wondering is there any command line tool, that returns current keyboard layout.
I have XkbLayout set to us, ru.
Update: setxkbmap returns layout settings, not selected layout. E.g.:
$ setxkbmap -print | grep xkb_symbols
xkb_symbols { include "pc+us+ru:2+inet(evdev)+capslock(grouplock)+terminate(ctrl_alt_bksp)" };
It will return same result no matter what current layout is.