From f59af7891eae767805a5ccf04799fe2f5929fb4d Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 23 Jul 2023 23:06:52 +0200 Subject: l antimicrox: fix with newer versions --- lass/2configs/antimicrox/default.nix | 12 +- lass/2configs/antimicrox/empty.amgp | 20 -- lass/2configs/antimicrox/empty.gamecontroller.amgp | 20 ++ lass/2configs/antimicrox/mouse.amgp | 272 -------------------- lass/2configs/antimicrox/mouse.gamecontroller.amgp | 281 +++++++++++++++++++++ 5 files changed, 310 insertions(+), 295 deletions(-) delete mode 100644 lass/2configs/antimicrox/empty.amgp create mode 100644 lass/2configs/antimicrox/empty.gamecontroller.amgp delete mode 100644 lass/2configs/antimicrox/mouse.amgp create mode 100644 lass/2configs/antimicrox/mouse.gamecontroller.amgp diff --git a/lass/2configs/antimicrox/default.nix b/lass/2configs/antimicrox/default.nix index 16f546ce6..2b683b8bc 100644 --- a/lass/2configs/antimicrox/default.nix +++ b/lass/2configs/antimicrox/default.nix @@ -1,6 +1,7 @@ { config, lib, pkgs, ... }: { systemd.services.antimicrox = { + after = [ "display-manager.service" ]; wantedBy = [ "multi-user.target" ]; environment = { DISPLAY = ":0"; @@ -8,18 +9,23 @@ serviceConfig = { User = config.users.users.mainUser.name; ExecStartPre = lib.singleton (pkgs.writeDash "init_state" "echo 0 > /tmp/gamepad.state"); - ExecStart = "${pkgs.antimicrox}/bin/antimicrox --no-tray --hidden --profile ${./mouse.amgp}"; + ExecStart = "${pkgs.antimicrox}/bin/antimicrox --hidden --profile ${./mouse.gamecontroller.amgp}"; }; }; + services.udev.extraRules = '' + KERNEL=="uinput", MODE="0660", GROUP="input", OPTIONS+="static_node=uinput" + ''; + environment.systemPackages = [ + pkgs.antimicrox (pkgs.writers.writeDashBin "gamepad_mouse_disable" '' echo 1 > /tmp/gamepad.state - ${pkgs.antimicrox}/bin/antimicrox --profile ${./empty.amgp} + ${pkgs.antimicrox}/bin/antimicrox --profile ${./empty.gamecontroller.amgp} '') (pkgs.writers.writeDashBin "gamepad_mouse_enable" '' echo 0 > /tmp/gamepad.state - ${pkgs.antimicrox}/bin/antimicrox --profile ${./mouse.amgp} + ${pkgs.antimicrox}/bin/antimicrox --profile ${./mouse.gamecontroller.amgp} '') (pkgs.writers.writeDashBin "gamepad_mouse_toggle" '' state=$(${pkgs.coreutils}/bin/cat /tmp/gamepad.state) diff --git a/lass/2configs/antimicrox/empty.amgp b/lass/2configs/antimicrox/empty.amgp deleted file mode 100644 index 0257bfe71..000000000 --- a/lass/2configs/antimicrox/empty.amgp +++ /dev/null @@ -1,20 +0,0 @@ - - - - XInput Controller - - 030000005e0400008e020000010100001118654 - - - - - - - - - - R Stick - L Stick - - - diff --git a/lass/2configs/antimicrox/empty.gamecontroller.amgp b/lass/2configs/antimicrox/empty.gamecontroller.amgp new file mode 100644 index 000000000..0257bfe71 --- /dev/null +++ b/lass/2configs/antimicrox/empty.gamecontroller.amgp @@ -0,0 +1,20 @@ + + + + XInput Controller + + 030000005e0400008e020000010100001118654 + + + + + + + + + + R Stick + L Stick + + + diff --git a/lass/2configs/antimicrox/mouse.amgp b/lass/2configs/antimicrox/mouse.amgp deleted file mode 100644 index 313e598de..000000000 --- a/lass/2configs/antimicrox/mouse.amgp +++ /dev/null @@ -1,272 +0,0 @@ - - - - XInput Controller - - 030000005e0400008e020000010100001118654 - - - - - - - - - - Stick 2 - Stick 1 - - - - - 1 - 29501 - 1412 - 90 - - 74 - 74 - 4 - 20 - 3 - easeoutquad - - - 3 - mousemovement - - - - - 74 - 74 - - - 74 - 74 - 4 - 20 - 3 - easeoutquad - - - 2 - mousemovement - - - - - 74 - 74 - - - 74 - 74 - 4 - 20 - 3 - easeoutquad - - - 4 - mousemovement - - - - - 74 - 74 - - - 74 - 74 - 4 - 20 - 3 - easeoutquad - - - 1 - mousemovement - - - - - 74 - 74 - - - - 2578 - 30799 - - linear - - - 6 - mousebutton - - - - - linear - - - linear - - - 5 - mousebutton - - - - - linear - - - linear - - - 7 - mousebutton - - - - - linear - - - linear - - - 4 - mousebutton - - - - - linear - - - - - 2 - 10 - - - 2 - 10 - - - 0x1000017 - keyboard - - - - - 2 - 10 - - - 2 - 10 - - - 0x1000011 - keyboard - - - - - 10 - 10 - - - 0x1000016 - keyboard - - - - - 2 - 10 - - - 2 - 10 - - - 2 - 10 - - - 0x1000010 - keyboard - - - - - - 2000 - positivehalf - - 100 - 100 - - - 100 - 100 - - - 250 - mousespeedmod - - - - - - positivehalf - - - - - - - - - diff --git a/lass/2configs/antimicrox/mouse.gamecontroller.amgp b/lass/2configs/antimicrox/mouse.gamecontroller.amgp new file mode 100644 index 000000000..743618f54 --- /dev/null +++ b/lass/2configs/antimicrox/mouse.gamecontroller.amgp @@ -0,0 +1,281 @@ + + + + XInput Controller + + 030000005e0400008e020000010100001118654 + + + + + + + + + + Stick 2 + Stick 1 + + + + + 1 + 29501 + 1412 + 90 + 100 + + 74 + 74 + 4 + 20 + 3 + easeoutquad + + + 1 + mousemovement + + + + + 74 + 74 + 4 + 20 + 3 + easeoutquad + + + 4 + mousemovement + + + + + 74 + 74 + + + 74 + 74 + 4 + 20 + 3 + easeoutquad + + + 2 + mousemovement + + + + + 74 + 74 + + + 74 + 74 + 4 + 20 + 3 + easeoutquad + + + 3 + mousemovement + + + + + 74 + 74 + + + 74 + 74 + + + + 2578 + 30799 + + linear + + + 4 + mousebutton + + + + + linear + + + 7 + mousebutton + + + + + linear + + + linear + + + 5 + mousebutton + + + + + linear + + + linear + + + 6 + mousebutton + + + + + linear + + + linear + + + + + 2 + 10 + + + 10 + 10 + + + 0x1000013 + keyboard + + + + + 2 + 10 + + + 2 + 10 + + + 0x1000014 + keyboard + + + + + 2 + 10 + + + 0x1000015 + keyboard + + + + + 2 + 10 + + + 2 + 10 + + + 2 + 10 + + + 0x1000012 + keyboard + + + + + + 2000 + positivehalf + + 100 + 100 + + + 100 + 100 + + + 250 + mousespeedmod + + + + + + positivehalf + + + + + + + + + + -- cgit v1.2.3