Commit 2904f959 authored by Anton Midyukov's avatar Anton Midyukov

l10n: create the X11 settings for keyboard layoutsk instead Xkbmap

We do the same as in the alterator-xkb. This change allows the system keyboard layout to be enabled in the display managers and wayland (when is xkb used).
parent 45ab43d0
#!/bin/sh
# partial port of livecd-setlocale (xkb bits)
PREFIX=/etc/X11/xinit
PREFIX=/etc/X11/xorg.conf.d
# Requires: xinitrc
# Requires: xorg-server-common
if [ ! -d "$PREFIX" ]; then
echo "** l10n-xkb: expected $PREFIX to exist (xinitrc)" >&2
echo "** l10n-xkb: expected $PREFIX to exist (xorg-server-common)" >&2
exit 0
fi
......@@ -14,6 +14,12 @@ if [ -z "$GLOBAL_XKB_VARIANTS" -o -z "$GLOBAL_XKB_KEYMAPS" ]; then
exit 0
fi
echo "-option $GLOBAL_XKB_SWITCH${GLOBAL_XKB_LED:+,$GLOBAL_XKB_LED} \
${GLOBAL_XKB_VARIANTS:+-variant $GLOBAL_XKB_VARIANTS} \
-layout $GLOBAL_XKB_KEYMAPS" > "$PREFIX"/Xkbmap
cat > "$PREFIX/00-keyboard.conf" << EOF
Section "InputClass"
Identifier "system-keyboard"
MatchIsKeyboard "on"
Option "XkbLayout" "$GLOBAL_XKB_KEYMAPS"
Option "XkbOptions" "$GLOBAL_XKB_SWITCH${GLOBAL_XKB_LED:+,$GLOBAL_XKB_LED} \
${GLOBAL_XKB_VARIANTS:+-variant $GLOBAL_XKB_VARIANTS}"
EndSection
EOF
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment