input: make "us" default layout, override by env vars
The other layouts can be confusing. Signed-off-by: Ran Benita <ran234@gmail.com>
This commit is contained in:
parent
9a51e10e32
commit
64c018bfd2
11
src/input.c
11
src/input.c
@ -240,11 +240,7 @@ int kmscon_input_new(struct kmscon_input **out)
|
|||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
struct kmscon_input *input;
|
struct kmscon_input *input;
|
||||||
|
static const char *layout, *variant, *options;
|
||||||
/* 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";
|
|
||||||
|
|
||||||
if (!out)
|
if (!out)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
@ -259,6 +255,11 @@ int kmscon_input_new(struct kmscon_input **out)
|
|||||||
input->ref = 1;
|
input->ref = 1;
|
||||||
input->state = INPUT_ASLEEP;
|
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);
|
ret = kmscon_xkb_new_desc(layout, variant, options, &input->xkb_desc);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
log_warning("input: cannot create xkb description\n");
|
log_warning("input: cannot create xkb description\n");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user