diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2010-08-10 14:13:57 +0000 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2010-08-10 14:13:57 +0000 |
commit | 2e0a569187991b815af91773e0c23546e1184a16 (patch) | |
tree | cd593ce1094181ef9448db1969ba9211c11c3c8c /modules/services | |
parent | 5456815016195630c0d07b4f25465515b5c72e4f (diff) | |
download | nixlib-2e0a569187991b815af91773e0c23546e1184a16.tar nixlib-2e0a569187991b815af91773e0c23546e1184a16.tar.gz nixlib-2e0a569187991b815af91773e0c23546e1184a16.tar.bz2 nixlib-2e0a569187991b815af91773e0c23546e1184a16.tar.lz nixlib-2e0a569187991b815af91773e0c23546e1184a16.tar.xz nixlib-2e0a569187991b815af91773e0c23546e1184a16.tar.zst nixlib-2e0a569187991b815af91773e0c23546e1184a16.zip |
* 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
Diffstat (limited to 'modules/services')
-rw-r--r-- | modules/services/x11/hardware/synaptics.nix | 33 | ||||
-rw-r--r-- | modules/services/x11/xserver.nix | 2 |
2 files changed, 13 insertions, 22 deletions
diff --git a/modules/services/x11/hardware/synaptics.nix b/modules/services/x11/hardware/synaptics.nix index 5f832ab7d224..a8abe87ea2be 100644 --- a/modules/services/x11/hardware/synaptics.nix +++ b/modules/services/x11/hardware/synaptics.nix @@ -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" - ''; - }; } diff --git a/modules/services/x11/xserver.nix b/modules/services/x11/xserver.nix index 8276f1162230..900ed00f4b44 100644 --- a/modules/services/x11/xserver.nix +++ b/modules/services/x11/xserver.nix @@ -462,7 +462,7 @@ in EndSection Section "InputClass" - Identifier "Keyboards catch all" + Identifier "Keyboard catchall" MatchIsKeyboard "on" Option "XkbRules" "base" Option "XkbModel" "${cfg.xkbModel}" |