From b0e15981eba89f44c9d35db4d2fc1f907396119a Mon Sep 17 00:00:00 2001 From: Yan Lin Date: Wed, 10 Dec 2025 23:35:21 +0100 Subject: [PATCH] make linearmouse config mouse specific --- modules/linearmouse.nix | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/modules/linearmouse.nix b/modules/linearmouse.nix index b2db2ab..3759ba6 100644 --- a/modules/linearmouse.nix +++ b/modules/linearmouse.nix @@ -6,28 +6,27 @@ "$schema" = "https://schema.linearmouse.app/0.10.2"; schemes = [ { - "if" = { - device = { - category = "mouse"; - }; - }; - scrolling = { - reverse = { - vertical = true; - }; - }; + "if".device.productName = "MX Master 3 Mac"; + scrolling.reverse.vertical = true; pointer = { acceleration = 0; speed = 0.6; }; - buttons = { - mappings = [ - { button = 3; action = "appExpose"; } - { button = 4; action = "missionControl"; } - { button = 2; action = "smartZoom"; } - { scroll = "left"; action = { keyPress = [ "leftArrow" ]; }; } - { scroll = "right"; action = { keyPress = [ "rightArrow" ]; }; } - ]; + buttons.mappings = [ + { button = 3; action = "appExpose"; } + { button = 4; action = "missionControl"; } + { button = 2; action = "smartZoom"; } + { scroll = "left"; action = { keyPress = [ "leftArrow" ]; }; } + { scroll = "right"; action = { keyPress = [ "rightArrow" ]; }; } + ]; + } + { + "if".device = { + vendorID = "0x004C"; + productID = "0x0269"; + }; + pointer = { + acceleration = 0; }; } ];