From 02bf0db39e6edff24cebce45625af9d5e6ea7d98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Mon, 2 Aug 2010 19:06:42 +0000 Subject: [PATCH] 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 --- modules/services/x11/hardware/synaptics.nix | 10 ++++-- modules/services/x11/xserver.nix | 37 ++++++--------------- 2 files changed, 18 insertions(+), 29 deletions(-) diff --git a/modules/services/x11/hardware/synaptics.nix b/modules/services/x11/hardware/synaptics.nix index 57e5318f481..ed1996eabd4 100644 --- a/modules/services/x11/hardware/synaptics.nix +++ b/modules/services/x11/hardware/synaptics.nix @@ -22,12 +22,12 @@ let cfg = config.services.xserver.synaptics; in }; minSpeed = mkOption { - default = "0.06"; + default = "0.6"; description = "Cursor speed factor for precision finger motion."; }; maxSpeed = mkOption { - default = "0.12"; + default = "1.0"; 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."; }; + 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 "VertTwoFingerScroll" "${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 ''; diff --git a/modules/services/x11/xserver.nix b/modules/services/x11/xserver.nix index 43c4a53c21f..e94dc8dc8a1 100644 --- a/modules/services/x11/xserver.nix +++ b/modules/services/x11/xserver.nix @@ -83,31 +83,6 @@ let ''; # */ }; - - halConfigFiles = singleton (pkgs.writeTextFile - { name = "hal-policy-keymap"; - destination = "/share/hal/fdi/policy/30-keymap.fdi"; - text = - '' - - - - - hal-setup-keymap - - - - base - ${cfg.xkbModel} - ${cfg.layout} - ${cfg.xkbOptions} - - - - ''; - }); - - in { @@ -404,8 +379,7 @@ in environment.systemPackages = config.environment.x11Packages; - services.hal.packages = halConfigFiles ++ - optional (elem "virtualbox" driverNames) kernelPackages.virtualboxGuestAdditions; + services.hal.packages = optional (elem "virtualbox" driverNames) kernelPackages.virtualboxGuestAdditions; jobs.xserver = { startOn = if cfg.autorun then "filesystem and stopped udevtrigger and started hal" else ""; @@ -483,6 +457,15 @@ in ${cfg.monitorSection} 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" Identifier "Layout[all]" ${cfg.serverLayoutSection}