The wayfire-kbdd-plugin can be used to automatically change the keyboard layout on a per-window basis.
For automatic start enable the plugin in Wayfire Config Manager or add the word kbdd to the core.plugins list.
The information about current keyboard layout can be exported to a file for use by external layout indicator.
meson build
ninja -C build
sudo ninja -C build install
This will install to /usr/local/
. To install in /usr
you can use the option: meson build --prefix=/usr
.