summaryrefslogtreecommitdiffstats
path: root/nixos
diff options
context:
space:
mode:
authorDavid Morgan <djm_uk@protonmail.com>2022-10-03 20:13:43 +0100
committerGitHub <noreply@github.com>2022-10-03 21:13:43 +0200
commitbd62717fd3c263629138fef08897420b2cc673ba (patch)
treefa95826c72fadf52b986ee563aaa445a3da0fbcb /nixos
parent0c8ac7b5193f42db94c1c5c0285497a6a79ec30f (diff)
libinput: Add tappingButtonMap option (#189612)
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/x11/hardware/libinput.nix10
1 files changed, 10 insertions, 0 deletions
diff --git a/nixos/modules/services/x11/hardware/libinput.nix b/nixos/modules/services/x11/hardware/libinput.nix
index 8eb11e281d66..0d30b9b5e68d 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"