input: make "us" default layout, override by env vars

The other layouts can be confusing.

Signed-off-by: Ran Benita <ran234@gmail.com>
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
Ran Benita 2012-01-09 00:57:15 +02:00 committed by David Herrmann
parent 86ec128d91
commit 01698145a7

View File

@ -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");