From 62eebe2012a7da009d51a62e75af3034ca198cc7 Mon Sep 17 00:00:00 2001 From: "Reid \"reidlab" Date: Wed, 11 Dec 2024 21:24:39 -0800 Subject: [PATCH] libinput --- hosts/goopnet-interface/default.nix | 1 + modules/desktop/hyprland.nix | 5 ----- modules/hardware/pointer.nix | 32 +++++++++++++++++++++++++++++ 3 files changed, 33 insertions(+), 5 deletions(-) create mode 100644 modules/hardware/pointer.nix diff --git a/hosts/goopnet-interface/default.nix b/hosts/goopnet-interface/default.nix index 865de78..78c1cf9 100755 --- a/hosts/goopnet-interface/default.nix +++ b/hosts/goopnet-interface/default.nix @@ -38,6 +38,7 @@ bluetooth.enable = true; pipewire.enable = true; print.enable = true; + pointer.enable = true; }; dev = { enable = true; diff --git a/modules/desktop/hyprland.nix b/modules/desktop/hyprland.nix index d9ba0b6..ee27140 100644 --- a/modules/desktop/hyprland.nix +++ b/modules/desktop/hyprland.nix @@ -188,11 +188,6 @@ in { input = { kb_layout = "us"; - touchpad = { - disable_while_typing = false; - natural_scroll = true; - }; - follow_mouse = 1; sensitivity = 0; # -1.0 - 1.0, 0 means no modification diff --git a/modules/hardware/pointer.nix b/modules/hardware/pointer.nix new file mode 100644 index 0000000..51a6514 --- /dev/null +++ b/modules/hardware/pointer.nix @@ -0,0 +1,32 @@ +{ pkgs, config, lib, ... }: + +with lib; +let + cfg = config.modules.hardware.pointer; +in { + options.modules.hardware.pointer = { + enable = mkEnableOption "Enable libinput tuning"; + }; + + config = mkIf cfg.enable { + services.libinput = { + enable = true; + mouse = { + accelProfile = "flat"; # gameing + + disableWhileTyping = false; + middleEmulation = false; + }; + touchpad = { + scrollMethod = "twofinger"; + sendEventsMode = "disabled-on-external-mouse"; + naturalScrolling = true; + tapping = true; + tappingDragLock = false; + + disableWhileTyping = false; + middleEmulation = false; + }; + }; + }; +}