diff options
Diffstat (limited to 'modules/services/x11/hardware/multitouch.nix')
-rw-r--r-- | modules/services/x11/hardware/multitouch.nix | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/modules/services/x11/hardware/multitouch.nix b/modules/services/x11/hardware/multitouch.nix index 3aa2760f3f0e..4f9048bfd910 100644 --- a/modules/services/x11/hardware/multitouch.nix +++ b/modules/services/x11/hardware/multitouch.nix @@ -2,6 +2,8 @@ with pkgs.lib; +let cfg = config.services.xserver.multitouch; in + { options = { @@ -14,11 +16,25 @@ with pkgs.lib; description = "Whether to enable multitouch touchpad support."; }; + invertScroll = mkOption { + default = false; + example = true; + type = types.bool; + description = "Whether to invert scrolling direction à la OSX Lion"; + }; + + ignorePalm = mkOption { + default = false; + example = true; + type = types.bool; + description = "Whether to ignore touches detected as being the palm (i.e when typing)"; + }; + }; }; - config = mkIf config.services.xserver.multitouch.enable { + config = mkIf cfg.enable { services.xserver.modules = [ pkgs.xf86_input_mtrack ]; @@ -29,6 +45,13 @@ with pkgs.lib; MatchIsTouchpad "on" Identifier "Touchpads" Driver "mtrack" + Option "IgnorePalm" "${if cfg.ignorePalm then "true" else "false"}" + ${optionalString cfg.invertScroll '' + Option "ScrollUpButton" "5" + Option "ScrollDownButton" "4" + Option "ScrollLeftButton" "7" + Option "ScrollRightButton" "6" + ''} EndSection ''; |