diff --git a/modules/services/window-managers/i3-sway/sway.nix b/modules/services/window-managers/i3-sway/sway.nix index 75eceeed8..9303f8e0f 100644 --- a/modules/services/window-managers/i3-sway/sway.nix +++ b/modules/services/window-managers/i3-sway/sway.nix @@ -7,6 +7,8 @@ let inherit (lib) concatStringsSep + filterAttrs + hasPrefix mapAttrsToList mkIf mkOption @@ -471,7 +473,9 @@ let (keycodebindingsStr keycodebindings) ] ++ optional (builtins.attrNames bindswitches != [ ]) (bindswitchesStr bindswitches) - ++ mapAttrsToList inputStr input + ++ mapAttrsToList inputStr (filterAttrs (n: v: n == "*") input) + ++ mapAttrsToList inputStr (filterAttrs (n: v: hasPrefix "type:" n) input) + ++ mapAttrsToList inputStr (filterAttrs (n: v: n != "*" && !(hasPrefix "type:" n)) input) ++ mapAttrsToList outputStr output # outputs ++ mapAttrsToList seatStr seat # seats ++ mapAttrsToList (modeStr cfg.config.bindkeysToCode) modes # modes diff --git a/tests/modules/services/sway/sway-modules.conf b/tests/modules/services/sway/sway-modules.conf index 85ca8338a..1751e63ce 100644 --- a/tests/modules/services/sway/sway-modules.conf +++ b/tests/modules/services/sway/sway-modules.conf @@ -74,6 +74,14 @@ input "*" { xkb_variant dvorak } +input "type:pointer" { + accel_profile flat +} + +input "2:10:TPPS/2_Elan_TrackPoint" { + accel_profile adaptive +} + output "HDMI-A-2" { bg ~/path/to/background.png fill } diff --git a/tests/modules/services/sway/sway-modules.nix b/tests/modules/services/sway/sway-modules.nix index 4cdac1238..ecef0fe3e 100644 --- a/tests/modules/services/sway/sway-modules.nix +++ b/tests/modules/services/sway/sway-modules.nix @@ -13,6 +13,12 @@ "*" = { xkb_variant = "dvorak"; }; + "type:pointer" = { + accel_profile = "flat"; + }; + "2:10:TPPS/2_Elan_TrackPoint" = { + accel_profile = "adaptive"; + }; }; output = { "HDMI-A-2" = {