* Use InputClass in the synaptics module to automatically use the

synaptics driver for all touchpads (unless the "dev" option is set).
* Get rid of some synaptics options: SHMConfig, Repeater (obsolete);
  *Edge (usually auto-detected), Protocol (use auto-detect instead).

svn path=/nixos/trunk/; revision=23092
This commit is contained in:
Eelco Dolstra 2010-08-10 14:13:57 +00:00
parent 5456815016
commit 2e0a569187
2 changed files with 13 additions and 22 deletions

@ -17,9 +17,13 @@ let cfg = config.services.xserver.synaptics; in
};
dev = mkOption {
default = "/dev/input/event0";
example = null;
description = "Event device for Synaptics touchpad, null to omit specification.";
default = null;
example = "/dev/input/event0";
description =
''
Path for touchpad device. Set to null to apply to any
auto-detected touchpad.
'';
};
minSpeed = mkOption {
@ -53,25 +57,17 @@ let cfg = config.services.xserver.synaptics; in
services.xserver.config =
''
Section "InputDevice"
Identifier "Touchpad[0]"
# Automatically enable the synaptics driver for all touchpads.
Section "InputClass"
Identifier "touchpad catchall"
Driver "synaptics"
${if cfg.dev != null then ''Option "Device" "${cfg.dev}"'' else ""}
Option "Protocol" "PS/2"
Option "LeftEdge" "1700"
Option "RightEdge" "5300"
Option "TopEdge" "1700"
Option "BottomEdge" "4200"
Option "FingerLow" "25"
Option "FingerHigh" "30"
MatchIsTouchpad "on"
${optionalString (cfg.dev != null) ''MatchDevicePath "${cfg.dev}"''}
Option "MaxTapTime" "180"
Option "MaxTapMove" "220"
Option "VertScrollDelta" "100"
Option "MinSpeed" "${cfg.minSpeed}"
Option "MaxSpeed" "${cfg.maxSpeed}"
Option "AccelFactor" "0.0010"
Option "SHMConfig" "on"
Option "Repeater" "/dev/input/mice"
Option "TapButton1" "1"
Option "TapButton2" "2"
Option "TapButton3" "3"
@ -81,11 +77,6 @@ let cfg = config.services.xserver.synaptics; in
EndSection
'';
services.xserver.serverLayoutSection =
''
InputDevice "Touchpad[0]" "CorePointer"
'';
};
}

@ -462,7 +462,7 @@ in
EndSection
Section "InputClass"
Identifier "Keyboards catch all"
Identifier "Keyboard catchall"
MatchIsKeyboard "on"
Option "XkbRules" "base"
Option "XkbModel" "${cfg.xkbModel}"