xkeyboardicon is a little flag in systray to show current X11 keyboard layout. It was written in C and uses XCB library.