Add xkb config options
parent
d0aa51aa6e
commit
b9142a94ae
|
@ -28,6 +28,11 @@
|
||||||
X(string, address) \
|
X(string, address) \
|
||||||
X(uint, port) \
|
X(uint, port) \
|
||||||
X(bool, enable_pam) \
|
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 {
|
struct cfg {
|
||||||
#define string char*
|
#define string char*
|
||||||
|
|
|
@ -946,9 +946,12 @@ int main(int argc, char* argv[])
|
||||||
self.keyboard_manager, self.selected_seat->wl_seat);
|
self.keyboard_manager, self.selected_seat->wl_seat);
|
||||||
|
|
||||||
struct xkb_rule_names rule_names = {
|
struct xkb_rule_names rule_names = {
|
||||||
.layout = self.kb_layout,
|
.rules = self.cfg.xkb_rules,
|
||||||
.model = "pc105",
|
.layout = self.kb_layout ? self.kb_layout : self.cfg.xkb_layout,
|
||||||
.variant = self.kb_variant,
|
.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);
|
keyboard_init(&self.keyboard_backend, &rule_names);
|
||||||
|
|
Loading…
Reference in New Issue