From cc1b86ba8ae72056cad533bd8d8599600e39ca30 Mon Sep 17 00:00:00 2001 From: aster <137767097+aster-void@users.noreply.github.com> Date: Tue, 24 Dec 2024 12:58:34 +0900 Subject: [PATCH 1/5] feat: touchpad.scrollSpeed --- modules/input.nix | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/modules/input.nix b/modules/input.nix index 89cbcf71..81ac5b62 100644 --- a/modules/input.nix +++ b/modules/input.nix @@ -178,6 +178,16 @@ let ''; apply = method: if (method == null) then null else scrollMethods."${method}"; }; + scrollSpeed = lib.mkOption { + type = with lib.types; nullOr (numbers.between 0.1 20); + default = null; + example = 0.1; + description = '' + Configure scrolling speed the touchpad. Lower is slower. + If unset, KDE will default to 0.3 . + ''; + apply = method: if (method == null) then null else scrollMethods."${method}"; + }; rightClickMethod = lib.mkOption { type = with lib.types; nullOr (enum (builtins.attrNames rightClickMethods)); default = null; @@ -222,6 +232,7 @@ let TapAndDrag = touchpad.tapAndDrag; TapDragLock = touchpad.tapDragLock; ScrollMethod = touchpad.scrollMethod; + ScrollFactor = touchpad.scrollSpeed; ClickMethod = touchpad.rightClickMethod; LmrTapButtonMap = touchpad.twoFingerTap; }; @@ -380,10 +391,12 @@ in !(lib.all (c: builtins.elem (lib.toLower c) validChars) (hexChars hex)) && (builtins.stringLength hex) > 0; allHexCodes = lib.flatten ( - map (t: [ - t.vendorId - t.productId - ]) (cfg.input.touchpads ++ cfg.input.mice) + map + (t: [ + t.vendorId + t.productId + ]) + (cfg.input.touchpads ++ cfg.input.mice) ); invalidHexCodes = builtins.filter hexCodeInvalid allHexCodes; in From 3d9e3af83a19eeb82f28bdd5396bfec677678b9f Mon Sep 17 00:00:00 2001 From: aster <137767097+aster-void@users.noreply.github.com> Date: Tue, 24 Dec 2024 13:03:31 +0900 Subject: [PATCH 2/5] delete apply because I forgot to --- modules/input.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/input.nix b/modules/input.nix index 81ac5b62..a7655853 100644 --- a/modules/input.nix +++ b/modules/input.nix @@ -186,7 +186,6 @@ let Configure scrolling speed the touchpad. Lower is slower. If unset, KDE will default to 0.3 . ''; - apply = method: if (method == null) then null else scrollMethods."${method}"; }; rightClickMethod = lib.mkOption { type = with lib.types; nullOr (enum (builtins.attrNames rightClickMethods)); From a3aa2bc4a8e2914176fb2449595d84295696f949 Mon Sep 17 00:00:00 2001 From: aster <137767097+aster-void@users.noreply.github.com> Date: Tue, 24 Dec 2024 13:04:22 +0900 Subject: [PATCH 3/5] revert accidental format change --- modules/input.nix | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/modules/input.nix b/modules/input.nix index a7655853..9a2e68ca 100644 --- a/modules/input.nix +++ b/modules/input.nix @@ -390,12 +390,10 @@ in !(lib.all (c: builtins.elem (lib.toLower c) validChars) (hexChars hex)) && (builtins.stringLength hex) > 0; allHexCodes = lib.flatten ( - map - (t: [ - t.vendorId - t.productId - ]) - (cfg.input.touchpads ++ cfg.input.mice) + map (t: [ + t.vendorId + t.productId + ]) (cfg.input.touchpads ++ cfg.input.mice) ); invalidHexCodes = builtins.filter hexCodeInvalid allHexCodes; in From 040301dc899c6c18b80287367e7ef6cd9acf3e6f Mon Sep 17 00:00:00 2001 From: aster <137767097+aster-void@users.noreply.github.com> Date: Tue, 24 Dec 2024 18:48:22 +0900 Subject: [PATCH 4/5] chore: fix typo --- modules/input.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/input.nix b/modules/input.nix index 9a2e68ca..118e463b 100644 --- a/modules/input.nix +++ b/modules/input.nix @@ -183,7 +183,7 @@ let default = null; example = 0.1; description = '' - Configure scrolling speed the touchpad. Lower is slower. + Configure the scrolling speed of the touchpad. Lower is slower. If unset, KDE will default to 0.3 . ''; }; From 63c229cbc339afe8adf287bff4a1cec2a6d36b45 Mon Sep 17 00:00:00 2001 From: aster <137767097+aster-void@users.noreply.github.com> Date: Tue, 24 Dec 2024 18:50:16 +0900 Subject: [PATCH 5/5] chore: KDE -> KDE Plasma --- modules/input.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/input.nix b/modules/input.nix index 118e463b..dae64d56 100644 --- a/modules/input.nix +++ b/modules/input.nix @@ -184,7 +184,7 @@ let example = 0.1; description = '' Configure the scrolling speed of the touchpad. Lower is slower. - If unset, KDE will default to 0.3 . + If unset, KDE Plasma will default to 0.3 . ''; }; rightClickMethod = lib.mkOption {