about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Simons <simons@cryp.to>2014-10-31 11:06:58 +0100
committerPeter Simons <simons@cryp.to>2014-10-31 11:06:58 +0100
commite18e77fbcdebc5bf1768157747b7e6d1ae7d9379 (patch)
tree388c08fe0b07fa0d5e8a2248e270bf83dd2e66c0
parent8ef85d448c98ecf82f0926842d093c115dd6fa84 (diff)
parent118096fc0bca95130b85baf0e939791b0200aa34 (diff)
downloadnixlib-e18e77fbcdebc5bf1768157747b7e6d1ae7d9379.tar
nixlib-e18e77fbcdebc5bf1768157747b7e6d1ae7d9379.tar.gz
nixlib-e18e77fbcdebc5bf1768157747b7e6d1ae7d9379.tar.bz2
nixlib-e18e77fbcdebc5bf1768157747b7e6d1ae7d9379.tar.lz
nixlib-e18e77fbcdebc5bf1768157747b7e6d1ae7d9379.tar.xz
nixlib-e18e77fbcdebc5bf1768157747b7e6d1ae7d9379.tar.zst
nixlib-e18e77fbcdebc5bf1768157747b7e6d1ae7d9379.zip
Merge pull request #4746 from abbradar/synaptics-fingers
Add "fingersMap" option to Synaptics
-rw-r--r--nixos/modules/services/x11/hardware/synaptics.nix20
1 files changed, 20 insertions, 0 deletions
diff --git a/nixos/modules/services/x11/hardware/synaptics.nix b/nixos/modules/services/x11/hardware/synaptics.nix
index f5b394b6d98b..d9e4bd817a51 100644
--- a/nixos/modules/services/x11/hardware/synaptics.nix
+++ b/nixos/modules/services/x11/hardware/synaptics.nix
@@ -25,12 +25,14 @@ in {
     services.xserver.synaptics = {
 
       enable = mkOption {
+        type = types.bool;
         default = false;
         example = true;
         description = "Whether to enable touchpad support.";
       };
 
       dev = mkOption {
+        type = types.nullOr types.str;
         default = null;
         example = "/dev/input/event0";
         description =
@@ -59,41 +61,56 @@ in {
       };
 
       twoFingerScroll = mkOption {
+        type = types.bool;
         default = false;
         description = "Whether to enable two-finger drag-scrolling.";
       };
 
       vertEdgeScroll = mkOption {
+        type = types.bool;
         default = ! cfg.twoFingerScroll;
         description = "Whether to enable vertical edge drag-scrolling.";
       };
 
       tapButtons = mkOption {
+        type = types.bool;
         default = true;
         example = false;
         description = "Whether to enable tap buttons.";
       };
 
       buttonsMap = mkOption {
+        type = types.listOf types.int;
         default = [1 2 3];
         example = [1 3 2];
         description = "Remap touchpad buttons.";
         apply = map toString;
       };
 
+      fingersMap = mkOption {
+        type = types.listOf types.int;
+        default = [1 2 3];
+        example = [1 3 2];
+        description = "Remap several-fingers taps.";
+        apply = map toString;
+      };
+
       palmDetect = mkOption {
+        type = types.bool;
         default = false;
         example = true;
         description = "Whether to enable palm detection (hardware support required)";
       };
 
       horizontalScroll = mkOption {
+        type = types.bool;
         default = true;
         example = false;
         description = "Whether to enable horizontal scrolling (on touchpad)";
       };
 
       additionalOptions = mkOption {
+        type = types.str;
         default = "";
         example = ''
           Option "RTCornerButton" "2"
@@ -130,6 +147,9 @@ in {
           Option "ClickFinger1" "${builtins.elemAt cfg.buttonsMap 0}"
           Option "ClickFinger2" "${builtins.elemAt cfg.buttonsMap 1}"
           Option "ClickFinger3" "${builtins.elemAt cfg.buttonsMap 2}"
+          Option "TapButton1" "${builtins.elemAt cfg.fingersMap 0}"
+          Option "TapButton2" "${builtins.elemAt cfg.fingersMap 1}"
+          Option "TapButton3" "${builtins.elemAt cfg.fingersMap 2}"
           Option "VertTwoFingerScroll" "${if cfg.twoFingerScroll then "1" else "0"}"
           Option "HorizTwoFingerScroll" "${if cfg.twoFingerScroll then "1" else "0"}"
           Option "VertEdgeScroll" "${if cfg.vertEdgeScroll then "1" else "0"}"