From bd62717fd3c263629138fef08897420b2cc673ba Mon Sep 17 00:00:00 2001 From: David Morgan Date: Mon, 3 Oct 2022 20:13:43 +0100 Subject: [PATCH] libinput: Add tappingButtonMap option (#189612) Co-authored-by: Sandro --- nixos/modules/services/x11/hardware/libinput.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/nixos/modules/services/x11/hardware/libinput.nix b/nixos/modules/services/x11/hardware/libinput.nix index 8eb11e281d6..0d30b9b5e68 100644 --- a/nixos/modules/services/x11/hardware/libinput.nix +++ b/nixos/modules/services/x11/hardware/libinput.nix @@ -156,6 +156,14 @@ let cfg = config.services.xserver.libinput; ''; }; + tappingButtonMap = mkOption { + type = types.nullOr (types.enum [ "lrm" "lmr" ]); + default = null; + description = lib.mdDoc '' + Set the button mapping for 1/2/3-finger taps to left/right/middle or left/middle/right, respectively. + ''; + }; + tappingDragLock = mkOption { type = types.bool; default = true; @@ -220,6 +228,7 @@ let cfg = config.services.xserver.libinput; Option "HorizontalScrolling" "${xorgBool cfg.${deviceType}.horizontalScrolling}" Option "SendEventsMode" "${cfg.${deviceType}.sendEventsMode}" Option "Tapping" "${xorgBool cfg.${deviceType}.tapping}" + ${optionalString (cfg.${deviceType}.tappingButtonMap != null) ''Option "TappingButtonMap" "${cfg.${deviceType}.tappingButtonMap}"''} Option "TappingDragLock" "${xorgBool cfg.${deviceType}.tappingDragLock}" Option "DisableWhileTyping" "${xorgBool cfg.${deviceType}.disableWhileTyping}" ${cfg.${deviceType}.additionalOptions} @@ -241,6 +250,7 @@ in { "horizontalScrolling" "sendEventsMode" "tapping" + "tappingButtonMap" "tappingDragLock" "transformationMatrix" "disableWhileTyping"