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.gamecontroller.amgp similarity index 100% rename from lass/2configs/antimicrox/empty.amgp rename to lass/2configs/antimicrox/empty.gamecontroller.amgp diff --git a/lass/2configs/antimicrox/mouse.amgp b/lass/2configs/antimicrox/mouse.gamecontroller.amgp similarity index 95% rename from lass/2configs/antimicrox/mouse.amgp rename to lass/2configs/antimicrox/mouse.gamecontroller.amgp index 313e598de..743618f54 100644 --- a/lass/2configs/antimicrox/mouse.amgp +++ b/lass/2configs/antimicrox/mouse.gamecontroller.amgp @@ -23,7 +23,8 @@ 29501 1412 90 - + 100 + 74 74 4 @@ -32,12 +33,26 @@ easeoutquad - 3 + 1 mousemovement - + + 74 + 74 + 4 + 20 + 3 + easeoutquad + + + 4 + mousemovement + + + + 74 74 @@ -59,7 +74,7 @@ 74 74 - + 74 74 4 @@ -68,29 +83,15 @@ easeoutquad - 4 + 3 mousemovement - + 74 74 - - 74 - 74 - 4 - 20 - 3 - easeoutquad - - - 1 - mousemovement - - - 74 74 @@ -99,16 +100,25 @@ 2578 30799 - + linear - 6 + 4 mousebutton - + + linear + + + 7 + mousebutton + + + + linear @@ -123,42 +133,33 @@ linear - + linear - 7 + 6 mousebutton - + linear - - linear - - - 4 - mousebutton - - - linear - + 2 10 - - 2 + + 10 10 - 0x1000017 + 0x1000013 keyboard @@ -172,22 +173,22 @@ 10 - 0x1000011 + 0x1000014 keyboard - - 10 + + 2 10 - 0x1000016 + 0x1000015 keyboard - + 2 10 @@ -200,7 +201,7 @@ 10 - 0x1000010 + 0x1000012 keyboard @@ -235,22 +236,6 @@ - - + + +