about summary refs log tree commit diff
path: root/nixos/modules/services/x11/hardware
diff options
context:
space:
mode:
authorChris Martin <ch.martin@gmail.com>2015-09-18 02:26:45 -0700
committerChris Martin <ch.martin@gmail.com>2015-09-29 19:06:49 -0700
commitde88ff99124dcc15ddef7743b1c6bc1ffd7d36f6 (patch)
tree1069e7070d04920472cfd147e2ec9cf32f88bbba /nixos/modules/services/x11/hardware
parente45e777c373c14b744b2940d806cf02dad84b42f (diff)
downloadnixlib-de88ff99124dcc15ddef7743b1c6bc1ffd7d36f6.tar
nixlib-de88ff99124dcc15ddef7743b1c6bc1ffd7d36f6.tar.gz
nixlib-de88ff99124dcc15ddef7743b1c6bc1ffd7d36f6.tar.bz2
nixlib-de88ff99124dcc15ddef7743b1c6bc1ffd7d36f6.tar.lz
nixlib-de88ff99124dcc15ddef7743b1c6bc1ffd7d36f6.tar.xz
nixlib-de88ff99124dcc15ddef7743b1c6bc1ffd7d36f6.tar.zst
nixlib-de88ff99124dcc15ddef7743b1c6bc1ffd7d36f6.zip
synaptics: add palmDetect tuning options
Diffstat (limited to 'nixos/modules/services/x11/hardware')
-rw-r--r--nixos/modules/services/x11/hardware/synaptics.nix18
1 files changed, 17 insertions, 1 deletions
diff --git a/nixos/modules/services/x11/hardware/synaptics.nix b/nixos/modules/services/x11/hardware/synaptics.nix
index e50ed08a218a..29cc31d70a09 100644
--- a/nixos/modules/services/x11/hardware/synaptics.nix
+++ b/nixos/modules/services/x11/hardware/synaptics.nix
@@ -122,6 +122,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,7 +188,9 @@ 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 ""}
+          ${optionalString cfg.palmDetect ''Option "PalmDetect" "1"''}
+          ${optionalString (cfg.palmMinWidth != null) ''Option "PalmMinWidth" "${toString cfg.palmMinWidth}"''}
+          ${optionalString (cfg.palmMinZ != null) ''Option "PalmMinZ" "${toString cfg.palmMinZ}"''}
           ${if cfg.horizontalScroll then "" else ''Option "HorizScrollDelta" "0"''}
           ${cfg.additionalOptions}
         EndSection