Added language switch support to xserver.nix
svn path=/nixos/trunk/; revision=9367
This commit is contained in:
parent
a34885af7e
commit
2cf1edf365
@ -703,6 +703,22 @@
|
|||||||
";
|
";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
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"
|
Driver "kbd"
|
||||||
Identifier "Keyboard[0]"
|
Identifier "Keyboard[0]"
|
||||||
Option "Protocol" "Standard"
|
Option "Protocol" "Standard"
|
||||||
Option "XkbLayout" "us"
|
Option "XkbLayout" "@layout@"
|
||||||
Option "XkbModel" "pc104"
|
Option "XkbModel" "pc104"
|
||||||
Option "XkbRules" "xfree86"
|
Option "XkbRules" "xfree86"
|
||||||
|
@xkbOptions@
|
||||||
EndSection
|
EndSection
|
||||||
|
|
||||||
|
|
||||||
|
@ -98,6 +98,11 @@ let
|
|||||||
Option \"TapButton3\" \"3\"
|
Option \"TapButton3\" \"3\"
|
||||||
EndSection " else "");
|
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]");
|
corePointer = (if getCfg "isSynaptics" then "Touchpad[0]" else "Mouse[0]");
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user