From 427340a2724169e316945e6686e547b0142dad5c Mon Sep 17 00:00:00 2001 From: Ronan Pigott Date: Sun, 27 Nov 2022 14:42:37 -0700 Subject: [PATCH] input/keyboard: enable user-specific keymaps This adds the xdg dirs to the lookup path when compiling xkb keymaps. With these the user can put custom symbol/rules files in $XDG_CONFIG_HOME/xkb to define user specific xkb options and layouts without modifying /usr/share/X11/xkb. --- sway/input/keyboard.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sway/input/keyboard.c b/sway/input/keyboard.c index 0b90b6aff..5a0facd9f 100644 --- a/sway/input/keyboard.c +++ b/sway/input/keyboard.c @@ -755,6 +755,9 @@ struct xkb_keymap *sway_keyboard_compile_keymap(struct input_config *ic, xkb_context_set_user_data(context, error); xkb_context_set_log_fn(context, handle_xkb_context_log); + // This includes the $XDG_CONFIG_HOME/xkb in the lookup + xkb_context_include_path_append_default(context); + struct xkb_keymap *keymap = NULL; if (ic && ic->xkb_file) {