From c1fda700de1c3452cba4949be2b39877b97c8e48 Mon Sep 17 00:00:00 2001 From: Yan Lin Date: Wed, 29 Oct 2025 07:57:45 +0100 Subject: [PATCH] finetune mouse acceleration --- hosts/nixos/thinkpad/home.nix | 8 ++++++++ hosts/nixos/thinkpad/system.nix | 7 +++++++ modules/desktop.nix | 2 +- modules/gnome.nix | 6 ++++++ 4 files changed, 22 insertions(+), 1 deletion(-) diff --git a/hosts/nixos/thinkpad/home.nix b/hosts/nixos/thinkpad/home.nix index 9304d7b..9fe3748 100644 --- a/hosts/nixos/thinkpad/home.nix +++ b/hosts/nixos/thinkpad/home.nix @@ -15,6 +15,14 @@ ../../../modules/papis.nix ]; + # ThinkPad-specific GNOME dconf overrides + dconf.settings = { + "org/gnome/desktop/peripherals/mouse" = { + speed = 0.0; # Match libinput accelSpeed for TrackPoint + accel-profile = "flat"; # Match libinput accelProfile (no acceleration) + }; + }; + programs.yt-dlp-custom = { enable = true; downloadDir = "~/Downloads/web-video"; diff --git a/hosts/nixos/thinkpad/system.nix b/hosts/nixos/thinkpad/system.nix index 05481d8..7fae1c4 100644 --- a/hosts/nixos/thinkpad/system.nix +++ b/hosts/nixos/thinkpad/system.nix @@ -111,6 +111,13 @@ accelProfile = "adaptive"; }; + # TrackPoint configuration (treated as mouse device) + services.libinput.mouse = { + accelSpeed = "0.0"; # Higher sensitivity for trackpoint (-1.0 to 1.0) + accelProfile = "flat"; # No acceleration curve for precise control + middleEmulation = false; # ThinkPad trackpoints have real middle buttons + }; + # Power management for laptops powerManagement = { enable = true; diff --git a/modules/desktop.nix b/modules/desktop.nix index 8d3dc68..dcf2d6e 100644 --- a/modules/desktop.nix +++ b/modules/desktop.nix @@ -72,7 +72,7 @@ in enable = true; touchpad = { naturalScrolling = true; - tapping = true; + tapping = false; }; }; diff --git a/modules/gnome.nix b/modules/gnome.nix index f42377d..2360388 100644 --- a/modules/gnome.nix +++ b/modules/gnome.nix @@ -16,6 +16,12 @@ in cursor-theme = "Adwaita"; }; + # Touchpad settings + "org/gnome/desktop/peripherals/touchpad" = { + tap-to-click = false; + natural-scroll = true; + }; + # Desktop background "org/gnome/desktop/background" = { picture-uri = "file:///home/yanlin/Documents/Library/nixos-nineish-dark@4k.png";