Added language switch support to xserver.nix

svn path=/nixos/trunk/; revision=9367
This commit is contained in:
Michael Raskin 2007-09-24 09:19:34 +00:00
parent a34885af7e
commit 2cf1edf365
3 changed files with 24 additions and 2 deletions

View File

@ -702,7 +702,23 @@
Event device for Synaptics touchpad.
";
}
{
name = ["services" "xserver" "layout"];
default = "us";
description ="
Keyboard layout.
";
}
{
name = ["services" "xserver" "xkbOptions"];
default = "";
example = "grp:caps_toggle, grp_led:scroll";
description ="
X keyboard options; layout switching goes here.
";
}
{

View File

@ -27,9 +27,10 @@ Section "InputDevice"
Driver "kbd"
Identifier "Keyboard[0]"
Option "Protocol" "Standard"
Option "XkbLayout" "us"
Option "XkbLayout" "@layout@"
Option "XkbModel" "pc104"
Option "XkbRules" "xfree86"
@xkbOptions@
EndSection

View File

@ -98,6 +98,11 @@ let
Option \"TapButton3\" \"3\"
EndSection " else "");
xkbOptions = (if (getCfg "xkbOptions") == "" then "" else
" Option \"XkbOptions\" \""+(getCfg "xkbOptions")+"\"");
layout = getCfg "layout";
corePointer = (if getCfg "isSynaptics" then "Touchpad[0]" else "Mouse[0]");