lol

Merge pull request #9913 from chris-martin/synaptics-options

Add synaptics options for palm detection and scroll speed

+27 -2
+27 -2
nixos/modules/services/x11/hardware/synaptics.nix
··· 62 62 description = "Cursor speed factor for highest-speed finger motion."; 63 63 }; 64 64 65 + scrollDelta = mkOption { 66 + type = types.nullOr types.int; 67 + default = null; 68 + example = 75; 69 + description = "Move distance of the finger for a scroll event."; 70 + }; 71 + 65 72 twoFingerScroll = mkOption { 66 73 type = types.bool; 67 74 default = false; ··· 122 129 description = "Whether to enable palm detection (hardware support required)"; 123 130 }; 124 131 132 + palmMinWidth = mkOption { 133 + type = types.nullOr types.int; 134 + default = null; 135 + example = 5; 136 + description = "Minimum finger width at which touch is considered a palm"; 137 + }; 138 + 139 + palmMinZ = mkOption { 140 + type = types.nullOr types.int; 141 + default = null; 142 + example = 20; 143 + description = "Minimum finger pressure at which touch is considered a palm"; 144 + }; 145 + 125 146 horizontalScroll = mkOption { 126 147 type = types.bool; 127 148 default = true; ··· 174 195 Option "HorizTwoFingerScroll" "${if cfg.horizTwoFingerScroll then "1" else "0"}" 175 196 Option "VertEdgeScroll" "${if cfg.vertEdgeScroll then "1" else "0"}" 176 197 Option "HorizEdgeScroll" "${if cfg.horizEdgeScroll then "1" else "0"}" 177 - ${if cfg.palmDetect then ''Option "PalmDetect" "1"'' else ""} 178 - ${if cfg.horizontalScroll then "" else ''Option "HorizScrollDelta" "0"''} 198 + ${optionalString cfg.palmDetect ''Option "PalmDetect" "1"''} 199 + ${optionalString (cfg.palmMinWidth != null) ''Option "PalmMinWidth" "${toString cfg.palmMinWidth}"''} 200 + ${optionalString (cfg.palmMinZ != null) ''Option "PalmMinZ" "${toString cfg.palmMinZ}"''} 201 + ${optionalString (cfg.scrollDelta != null) ''Option "VertScrollDelta" "${toString cfg.scrollDelta}"''} 202 + ${if !cfg.horizontalScroll then ''Option "HorizScrollDelta" "0"'' 203 + else (optionalString (cfg.scrollDelta != null) ''Option "HorizScrollDelta" "${toString cfg.scrollDelta}"'')} 179 204 ${cfg.additionalOptions} 180 205 EndSection 181 206 '';