summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorAustin Seipp <aseipp@pobox.com>2015-07-19 12:50:33 -0500
committerAustin Seipp <aseipp@pobox.com>2015-07-19 12:50:33 -0500
commit0c4fca7d61016108b8b3cf44280afed57ff2a2f8 (patch)
tree129ba8731b455cc7478c085a3c97f7e37fb0f6c3 /nixos
parent18b971d611c2391b29357e698b4abbe56db98e52 (diff)
parent0f63a624f746dae1ea0ea0338629ea0bb53a8f0c (diff)
downloadnixpkgs-0c4fca7d61016108b8b3cf44280afed57ff2a2f8.tar
nixpkgs-0c4fca7d61016108b8b3cf44280afed57ff2a2f8.tar.gz
nixpkgs-0c4fca7d61016108b8b3cf44280afed57ff2a2f8.tar.bz2
nixpkgs-0c4fca7d61016108b8b3cf44280afed57ff2a2f8.tar.lz
nixpkgs-0c4fca7d61016108b8b3cf44280afed57ff2a2f8.tar.xz
nixpkgs-0c4fca7d61016108b8b3cf44280afed57ff2a2f8.tar.zst
nixpkgs-0c4fca7d61016108b8b3cf44280afed57ff2a2f8.zip
Merge pull request #8690 from laMudri/synaptics
synaptics: fix to allow for more scrolling choices
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/x11/hardware/synaptics.nix27
1 files changed, 23 insertions, 4 deletions
diff --git a/nixos/modules/services/x11/hardware/synaptics.nix b/nixos/modules/services/x11/hardware/synaptics.nix
index 9e44ce811c3..e967dc91141 100644
--- a/nixos/modules/services/x11/hardware/synaptics.nix
+++ b/nixos/modules/services/x11/hardware/synaptics.nix
@@ -63,12 +63,30 @@ in {
       twoFingerScroll = mkOption {
         type = types.bool;
         default = false;
-        description = "Whether to enable two-finger drag-scrolling.";
+        description = "Whether to enable two-finger drag-scrolling. Overridden by horizTwoFingerScroll and vertTwoFingerScroll.";
+      };
+
+      horizTwoFingerScroll = mkOption {
+        type = types.bool;
+        default = cfg.twoFingerScroll;
+        description = "Whether to enable horizontal two-finger drag-scrolling.";
+      };
+
+      vertTwoFingerScroll = mkOption {
+        type = types.bool;
+        default = cfg.twoFingerScroll;
+        description = "Whether to enable vertical two-finger drag-scrolling.";
+      };
+
+      horizEdgeScroll = mkOption {
+        type = types.bool;
+        default = ! cfg.horizTwoFingerScroll;
+        description = "Whether to enable horizontal edge drag-scrolling.";
       };
 
       vertEdgeScroll = mkOption {
         type = types.bool;
-        default = ! cfg.twoFingerScroll;
+        default = ! cfg.vertTwoFingerScroll;
         description = "Whether to enable vertical edge drag-scrolling.";
       };
 
@@ -147,9 +165,10 @@ in {
           Option "ClickFinger1" "${builtins.elemAt cfg.buttonsMap 0}"
           Option "ClickFinger2" "${builtins.elemAt cfg.buttonsMap 1}"
           Option "ClickFinger3" "${builtins.elemAt cfg.buttonsMap 2}"
-          Option "VertTwoFingerScroll" "${if cfg.twoFingerScroll then "1" else "0"}"
-          Option "HorizTwoFingerScroll" "${if cfg.twoFingerScroll then "1" else "0"}"
+          Option "VertTwoFingerScroll" "${if cfg.vertTwoFingerScroll then "1" else "0"}"
+          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"''}
           ${cfg.additionalOptions}