Skip to main content

layouts_in_keymap

Function layouts_in_keymap 

Source
pub(crate) fn layouts_in_keymap(fd: OwnedFd, size: usize) -> Vec<String>
Expand description

Read the keymap the compositor sent and pull the layout names out of it.

XKB text names its layouts in the xkb_symbols section, as a +-joined recipe like pc+us+ua:2+inet(evdev). Parsing that is unlovely and it is what the information is: there is no protocol event that says “you have these two layouts”, so every client that shows a layout indicator does this or does without.