diff --git a/include/cfg.h b/include/cfg.h index 9c7a50a..b067bf8 100644 --- a/include/cfg.h +++ b/include/cfg.h @@ -28,6 +28,11 @@ X(string, address) \ X(uint, port) \ X(bool, enable_pam) \ + X(string, xkb_rules) \ + X(string, xkb_model) \ + X(string, xkb_layout) \ + X(string, xkb_variant) \ + X(string, xkb_options) \ struct cfg { #define string char* diff --git a/src/main.c b/src/main.c index 2eb4534..5f352e3 100644 --- a/src/main.c +++ b/src/main.c @@ -946,9 +946,12 @@ int main(int argc, char* argv[]) self.keyboard_manager, self.selected_seat->wl_seat); struct xkb_rule_names rule_names = { - .layout = self.kb_layout, - .model = "pc105", - .variant = self.kb_variant, + .rules = self.cfg.xkb_rules, + .layout = self.kb_layout ? self.kb_layout : self.cfg.xkb_layout, + .model = self.cfg.xkb_model ? self.cfg.xkb_model : "pc105", + .variant = self.kb_variant ? self.kb_variant : + self.cfg.xkb_variant, + .options = self.cfg.xkb_options, }; keyboard_init(&self.keyboard_backend, &rule_names);