From 85ed3ca9c7bf12d0095aa36c79d7d98c751fe429 Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Mon, 8 Aug 2016 13:36:30 +0200 Subject: [PATCH] libinput.accelProfile: improve docs & new default MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The link to some (of course non-existing, i.e. freedesktop) “libinput” documentation is replaced by a piece of the API documentation. The default is changed since the documentation suggests `adaptive` should be it. https://wayland.freedesktop.org/libinput/doc/latest/group__config.html#gad63796972347f318b180e322e35cee79 Also fix a missing string conversion for `scrollButton`. --- nixos/doc/manual/release-notes/rl-1609.xml | 7 +++++++ .../services/x11/hardware/libinput.nix | 21 ++++++++++++------- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/nixos/doc/manual/release-notes/rl-1609.xml b/nixos/doc/manual/release-notes/rl-1609.xml index 7a85d5cd5cb..8dd4e1a9f64 100644 --- a/nixos/doc/manual/release-notes/rl-1609.xml +++ b/nixos/doc/manual/release-notes/rl-1609.xml @@ -51,6 +51,13 @@ following incompatible changes: gitlab-run and gitlab-rake scripts because gitlab-runner is a component of Gitlab CI. + + services.xserver.libinput.accelProfile default + changed from flat to adaptive, + as per + official documentation. + + diff --git a/nixos/modules/services/x11/hardware/libinput.nix b/nixos/modules/services/x11/hardware/libinput.nix index 47ce9e56604..b358550ba41 100644 --- a/nixos/modules/services/x11/hardware/libinput.nix +++ b/nixos/modules/services/x11/hardware/libinput.nix @@ -25,16 +25,21 @@ in { accelProfile = mkOption { type = types.enum [ "flat" "adaptive" ]; - default = "flat"; - example = "adaptive"; + default = "adaptive"; + example = "flat"; description = '' - Sets the pointer acceleration profile to the given profile. Permitted values are adaptive, flat. - Not all devices support this option or all profiles. If a profile is unsupported, the default profile - for this is used. For a description on the profiles and their behavior, see the libinput documentation. + Sets the pointer acceleration profile to the given profile. + Permitted values are adaptive, flat. + Not all devices support this option or all profiles. + If a profile is unsupported, the default profile for this is used. + flat: Pointer motion is accelerated by a constant + (device-specific) factor, depending on the current speed. + adaptive: Pointer acceleration depends on the input speed. + This is the default profile for most devices. ''; - }; - + }; + accelSpeed = mkOption { type = types.nullOr types.string; default = null; @@ -216,7 +221,7 @@ in { Option "LeftHanded" "${xorgBool cfg.leftHanded}" Option "MiddleEmulation" "${xorgBool cfg.middleEmulation}" Option "NaturalScrolling" "${xorgBool cfg.naturalScrolling}" - ${optionalString (cfg.scrollButton != null) ''Option "ScrollButton" "${cfg.scrollButton}"''} + ${optionalString (cfg.scrollButton != null) ''Option "ScrollButton" "${toString cfg.scrollButton}"''} Option "ScrollMethod" "${cfg.scrollMethod}" Option "HorizontalScrolling" "${xorgBool cfg.horizontalScrolling}" Option "SendEventsMode" "${cfg.sendEventsMode}"