From 64c018bfd28a1ca372ffc25ca40d443cd7a29c54 Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Mon, 9 Jan 2012 00:57:15 +0200 Subject: [PATCH] input: make "us" default layout, override by env vars The other layouts can be confusing. Signed-off-by: Ran Benita --- src/input.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/input.c b/src/input.c index e0f2f37..9d239ee 100644 --- a/src/input.c +++ b/src/input.c @@ -240,11 +240,7 @@ int kmscon_input_new(struct kmscon_input **out) { int ret; struct kmscon_input *input; - - /* TODO: Make configurable */ - static const char *layout = "us,ru,il"; - static const char *variant = "intl,,biblical"; - static const char *options = "grp:menu_toggle,grp:ctrl_shift_toggle"; + static const char *layout, *variant, *options; if (!out) return -EINVAL; @@ -259,6 +255,11 @@ int kmscon_input_new(struct kmscon_input **out) input->ref = 1; input->state = INPUT_ASLEEP; + /* TODO: Make properly configurable */ + layout = getenv("KMSCON_XKB_LAYOUT") ?: "us"; + variant = getenv("KMSCON_XKB_VARIANT") ?: ""; + options = getenv("KMSCON_XKB_OPTIONS") ?: ""; + ret = kmscon_xkb_new_desc(layout, variant, options, &input->xkb_desc); if (ret) { log_warning("input: cannot create xkb description\n");