diff options
author | Franz Pletz <fpletz@fnordicwalking.de> | 2016-02-14 06:08:36 +0100 |
---|---|---|
committer | Franz Pletz <fpletz@fnordicwalking.de> | 2016-02-14 06:08:36 +0100 |
commit | 6a036d9fca013265b4109ffcaf6df62efa010fa3 (patch) | |
tree | 5279036d98b3ee6190b6cd210b73151e74988936 /nixos/modules/services | |
parent | 278096540ed0ac1e2a78e177d6b28c1f147fc2be (diff) | |
parent | f8581a5a955cc279e6c951f1b001df49adfaaf73 (diff) | |
download | nixlib-6a036d9fca013265b4109ffcaf6df62efa010fa3.tar nixlib-6a036d9fca013265b4109ffcaf6df62efa010fa3.tar.gz nixlib-6a036d9fca013265b4109ffcaf6df62efa010fa3.tar.bz2 nixlib-6a036d9fca013265b4109ffcaf6df62efa010fa3.tar.lz nixlib-6a036d9fca013265b4109ffcaf6df62efa010fa3.tar.xz nixlib-6a036d9fca013265b4109ffcaf6df62efa010fa3.tar.zst nixlib-6a036d9fca013265b4109ffcaf6df62efa010fa3.zip |
Merge pull request #9913 from chris-martin/synaptics-options
Add synaptics options for palm detection and scroll speed
Diffstat (limited to 'nixos/modules/services')
-rw-r--r-- | nixos/modules/services/x11/hardware/synaptics.nix | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/nixos/modules/services/x11/hardware/synaptics.nix b/nixos/modules/services/x11/hardware/synaptics.nix index e50ed08a218a..2981e7545e81 100644 --- a/nixos/modules/services/x11/hardware/synaptics.nix +++ b/nixos/modules/services/x11/hardware/synaptics.nix @@ -62,6 +62,13 @@ in { description = "Cursor speed factor for highest-speed finger motion."; }; + scrollDelta = mkOption { + type = types.nullOr types.int; + default = null; + example = 75; + description = "Move distance of the finger for a scroll event."; + }; + twoFingerScroll = mkOption { type = types.bool; default = false; @@ -122,6 +129,20 @@ in { description = "Whether to enable palm detection (hardware support required)"; }; + palmMinWidth = mkOption { + type = types.nullOr types.int; + default = null; + example = 5; + description = "Minimum finger width at which touch is considered a palm"; + }; + + palmMinZ = mkOption { + type = types.nullOr types.int; + default = null; + example = 20; + description = "Minimum finger pressure at which touch is considered a palm"; + }; + horizontalScroll = mkOption { type = types.bool; default = true; @@ -174,8 +195,12 @@ in { Option "HorizTwoFingerScroll" "${if cfg.horizTwoFingerScroll then "1" else "0"}" Option "VertEdgeScroll" "${if cfg.vertEdgeScroll then "1" else "0"}" Option "HorizEdgeScroll" "${if cfg.horizEdgeScroll then "1" else "0"}" - ${if cfg.palmDetect then ''Option "PalmDetect" "1"'' else ""} - ${if cfg.horizontalScroll then "" else ''Option "HorizScrollDelta" "0"''} + ${optionalString cfg.palmDetect ''Option "PalmDetect" "1"''} + ${optionalString (cfg.palmMinWidth != null) ''Option "PalmMinWidth" "${toString cfg.palmMinWidth}"''} + ${optionalString (cfg.palmMinZ != null) ''Option "PalmMinZ" "${toString cfg.palmMinZ}"''} + ${optionalString (cfg.scrollDelta != null) ''Option "VertScrollDelta" "${toString cfg.scrollDelta}"''} + ${if !cfg.horizontalScroll then ''Option "HorizScrollDelta" "0"'' + else (optionalString (cfg.scrollDelta != null) ''Option "HorizScrollDelta" "${toString cfg.scrollDelta}"'')} ${cfg.additionalOptions} EndSection ''; |