Added language switch support to xserver.nix
svn path=/nixos/trunk/; revision=9367
This commit is contained in:
parent
a34885af7e
commit
2cf1edf365
@ -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.
|
||||
";
|
||||
}
|
||||
|
||||
|
||||
{
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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]");
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user