Making the X keyboard settings go in xorg.conf, and not in HAL anymore.

Setting to the synaptics default speeds the speeds I like. I think we were having
defaults still from the time the values meant some different speeds.

The 'synclient' program now does not work, but the 'xinput' program (xorg.xinput)
can modify in runtime the touchpad settings too.


svn path=/nixos/trunk/; revision=22904
This commit is contained in:
Lluís Batlle i Rossell 2010-08-02 19:06:42 +00:00
parent 21eb6ed412
commit 02bf0db39e
2 changed files with 18 additions and 29 deletions

View File

@ -22,12 +22,12 @@ let cfg = config.services.xserver.synaptics; in
}; };
minSpeed = mkOption { minSpeed = mkOption {
default = "0.06"; default = "0.6";
description = "Cursor speed factor for precision finger motion."; description = "Cursor speed factor for precision finger motion.";
}; };
maxSpeed = mkOption { maxSpeed = mkOption {
default = "0.12"; default = "1.0";
description = "Cursor speed factor for highest-speed finger motion."; description = "Cursor speed factor for highest-speed finger motion.";
}; };
@ -36,6 +36,11 @@ let cfg = config.services.xserver.synaptics; in
description = "Whether to enable two-finger drag-scrolling."; description = "Whether to enable two-finger drag-scrolling.";
}; };
vertEdgeScroll = mkOption {
default = true;
description = "Whether to enable vertical edge drag-scrolling.";
};
}; };
}; };
@ -71,6 +76,7 @@ let cfg = config.services.xserver.synaptics; in
Option "TapButton3" "3" Option "TapButton3" "3"
Option "VertTwoFingerScroll" "${if cfg.twoFingerScroll then "1" else "0"}" Option "VertTwoFingerScroll" "${if cfg.twoFingerScroll then "1" else "0"}"
Option "HorizTwoFingerScroll" "${if cfg.twoFingerScroll then "1" else "0"}" Option "HorizTwoFingerScroll" "${if cfg.twoFingerScroll then "1" else "0"}"
Option "VertEdgeScroll" "${if cfg.vertEdgeScroll then "1" else "0"}"
EndSection EndSection
''; '';

View File

@ -83,31 +83,6 @@ let
''; # */ ''; # */
}; };
halConfigFiles = singleton (pkgs.writeTextFile
{ name = "hal-policy-keymap";
destination = "/share/hal/fdi/policy/30-keymap.fdi";
text =
''
<?xml version="1.0" encoding="ISO-8859-1"?>
<deviceinfo version="0.2">
<device>
<match key="info.capabilities" contains="input.keymap">
<append key="info.callouts.add" type="strlist">hal-setup-keymap</append>
</match>
<match key="info.capabilities" contains="input.keys">
<merge key="input.x11_options.XkbRules" type="string">base</merge>
<merge key="input.x11_options.XkbModel" type="string">${cfg.xkbModel}</merge>
<merge key="input.x11_options.XkbLayout" type="string">${cfg.layout}</merge>
<append key="input.x11_options.XkbOptions" type="strlist">${cfg.xkbOptions}</append>
</match>
</device>
</deviceinfo>
'';
});
in in
{ {
@ -404,8 +379,7 @@ in
environment.systemPackages = config.environment.x11Packages; environment.systemPackages = config.environment.x11Packages;
services.hal.packages = halConfigFiles ++ services.hal.packages = optional (elem "virtualbox" driverNames) kernelPackages.virtualboxGuestAdditions;
optional (elem "virtualbox" driverNames) kernelPackages.virtualboxGuestAdditions;
jobs.xserver = jobs.xserver =
{ startOn = if cfg.autorun then "filesystem and stopped udevtrigger and started hal" else ""; { startOn = if cfg.autorun then "filesystem and stopped udevtrigger and started hal" else "";
@ -483,6 +457,15 @@ in
${cfg.monitorSection} ${cfg.monitorSection}
EndSection EndSection
Section "InputClass"
Identifier "Keyboards catch all"
MatchIsKeyboard "on"
Option "XkbRules" "base"
Option "XkbModel" "${cfg.xkbModel}"
Option "XkbLayout" "${cfg.layout}"
Option "XkbOptions" "${cfg.xkbOptions}"
EndSection
Section "ServerLayout" Section "ServerLayout"
Identifier "Layout[all]" Identifier "Layout[all]"
${cfg.serverLayoutSection} ${cfg.serverLayoutSection}