From d3f687951a18f184e609a44aa06af3b271e39d81 Mon Sep 17 00:00:00 2001 From: Robert Klotzner <robert.klotzner@gmx.at> Date: Wed, 13 Jan 2016 09:27:02 +0100 Subject: [PATCH] nixos: libinput added options - natural scrolling - scroll method - disable while typing --- .../services/x11/hardware/libinput.nix | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/nixos/modules/services/x11/hardware/libinput.nix b/nixos/modules/services/x11/hardware/libinput.nix index 0b4637dc55f9..a5629db53fe0 100644 --- a/nixos/modules/services/x11/hardware/libinput.nix +++ b/nixos/modules/services/x11/hardware/libinput.nix @@ -57,6 +57,13 @@ in { ''; }; + naturalScrolling = mkOption { + type = types.bool; + default = false; + example = true; + description = "Enables or disables natural scrolling behavior."; + }; + tapping = mkOption { type = types.bool; default = true; @@ -67,6 +74,27 @@ in { ''; }; + scrollMethod = mkOption { + type = types.enum [ "twofinger" "edge" "none" ]; + default = "twofinger"; + example = "edge"; + description = + '' + Specify the scrolling method. + ''; + }; + + disableWhileTyping = mkOption { + type = types.bool; + default = true; + example = false; + description = + '' + Disable input method while typing. + ''; + }; + + tappingDragLock = mkOption { type = types.bool; default = true; @@ -114,8 +142,11 @@ in { ${optionalString (cfg.accelSpeed != null) ''Option "AccelSpeed" "${cfg.accelSpeed}"''} ${optionalString (cfg.buttonMapping != null) ''Option "ButtonMapping" "${cfg.buttonMapping}"''} ${optionalString (cfg.calibrationMatrix != null) ''Option "CalibrationMatrix" "${cfg.calibrationMatrix}"''} + ${optionalString cfg.naturalScrolling ''Option "NaturalScrolling" "on"''} ${if cfg.tapping then ''Option "Tapping" "1"'' else ""} ${if cfg.tappingDragLock then ''Option "TappingDragLock" "1"'' else ""} + Option "ScrollMethod" "${cfg.scrollMethod}" + ${optionalString cfg.disableWhileTyping ''Option "DisableWhileTyping" "on"''} ${cfg.additionalOptions} EndSection '';