1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-26 23:52:33 +00:00

nixos: libinput added options

- natural scrolling
- scroll method
- disable while typing
This commit is contained in:
Robert Klotzner 2016-01-13 09:27:02 +01:00
parent a2db14925b
commit d3f687951a

View file

@ -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
'';