synaptics: add scrollDelta option

Changed files
+10 -1
nixos
modules
services
x11
hardware
+10 -1
nixos/modules/services/x11/hardware/synaptics.nix
···
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;
···
${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"''}
+
${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
'';