feature request: honor $XKB_CONFIG_ROOT
Current behavior
The directory where keyboard layouts are looked up is hard-coded at compilation time.
Desired behavior
If the XKB_CONFIG_ROOT
environment variable is set, it should override the compile-time path. Otherwise, nothing changes.
Reasoning
I use GNOME, NixOS[1], which is a distribution that insists on installed software being immutable to allow structural sharing, and my own custom keyboard layout. In order to make GNOME on NixOS recognize the extra layout, I had to figure out how libgnome-desktop
& friends discovered keyboard layouts and rig together a setup that automatically recompiles them to support the custom xkeyboard_config
package that NixOS can generate. This works perfectly as-is, but it leads to a fair bit of unnecessary recompilation work for me and potentially others in my (admittedly rare) situation. When figuring this out I assumed at first that this library would use libxkbcommon
internally since it seems designed for this use case and therefore that it would honor the environment variable, but that's not the case. If it did honor the variable, it would have made my problem simpler to solve.
Is that feasible? planned? If I implement it, might it be merged?