diff options
author | Robert Klotzner <robert.klotzner@gmx.at> | 2016-01-13 09:27:02 +0100 |
---|---|---|
committer | Robert Klotzner <robert.klotzner@gmx.at> | 2016-01-22 13:09:54 +0100 |
commit | d3f687951a18f184e609a44aa06af3b271e39d81 (patch) | |
tree | 10af8acd1528fa6c128e044aa4cfd4a9e185846e /nixos/modules/services/x11/hardware | |
parent | a2db14925b9e8c84c080b8e4d48c22e6c8aa72a2 (diff) |
nixos: libinput added options
- natural scrolling
- scroll method
- disable while typing
Diffstat (limited to 'nixos/modules/services/x11/hardware')
-rw-r--r-- | nixos/modules/services/x11/hardware/libinput.nix | 31 |
1 files changed, 31 insertions, 0 deletions
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 ''; |