From 9da25c99fe2f4e2255c52f6cdb65b2b54f98e119 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Thu, 15 Aug 2024 01:49:10 -0300 Subject: [PATCH] sway: configure mouse --- system/configuration.nix | 1 + system/mouse.nix | 15 +++++++++++++++ user/sway/default.nix | 6 ++++++ 3 files changed, 22 insertions(+) create mode 100644 system/mouse.nix diff --git a/system/configuration.nix b/system/configuration.nix index 6661e40..c8095f6 100644 --- a/system/configuration.nix +++ b/system/configuration.nix @@ -18,6 +18,7 @@ ./fonts.nix ./sound.nix ./bluetooth.nix + ./mouse.nix ./locale.nix ./users.nix ./containers.nix diff --git a/system/mouse.nix b/system/mouse.nix new file mode 100644 index 0000000..b5d5b16 --- /dev/null +++ b/system/mouse.nix @@ -0,0 +1,15 @@ +{ + # Allow configuring Logitech Peripherals + services.ratbagd.enable = true; + + # Sway does not undersand high resolution scroll wheels + # I don't need this, so I disable it + environment.etc."libinput/local-overrides.quirks".text = '' + [Logitech G502 X PLUS] + MatchUdevType=mouse + MatchBus=usb + MatchVendor=0x046D + MatchProduct=0x4099 + AttrEventCode=-REL_WHEEL_HI_RES + ''; +} diff --git a/user/sway/default.nix b/user/sway/default.nix index 6b495d2..a8ed460 100644 --- a/user/sway/default.nix +++ b/user/sway/default.nix @@ -79,6 +79,12 @@ in }; # Ignore PS4 controller touchpad events input."1356:2508:Wireless_Controller_Touchpad".events = "disabled"; + + input."1133:16537:Logitech_G502_X_PLUS" = { + accel_profile = "flat"; + pointer_accel = "0"; + }; + input."type:touchpad" = { # Disable While Typing dwt = "enabled";