l antimicrox: fix with newer versions
This commit is contained in:
parent
4dc356281c
commit
f59af7891e
@ -1,6 +1,7 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
{
|
{
|
||||||
systemd.services.antimicrox = {
|
systemd.services.antimicrox = {
|
||||||
|
after = [ "display-manager.service" ];
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
environment = {
|
environment = {
|
||||||
DISPLAY = ":0";
|
DISPLAY = ":0";
|
||||||
@ -8,18 +9,23 @@
|
|||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
User = config.users.users.mainUser.name;
|
User = config.users.users.mainUser.name;
|
||||||
ExecStartPre = lib.singleton (pkgs.writeDash "init_state" "echo 0 > /tmp/gamepad.state");
|
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 = [
|
environment.systemPackages = [
|
||||||
|
pkgs.antimicrox
|
||||||
(pkgs.writers.writeDashBin "gamepad_mouse_disable" ''
|
(pkgs.writers.writeDashBin "gamepad_mouse_disable" ''
|
||||||
echo 1 > /tmp/gamepad.state
|
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" ''
|
(pkgs.writers.writeDashBin "gamepad_mouse_enable" ''
|
||||||
echo 0 > /tmp/gamepad.state
|
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" ''
|
(pkgs.writers.writeDashBin "gamepad_mouse_toggle" ''
|
||||||
state=$(${pkgs.coreutils}/bin/cat /tmp/gamepad.state)
|
state=$(${pkgs.coreutils}/bin/cat /tmp/gamepad.state)
|
||||||
|
@ -23,7 +23,8 @@
|
|||||||
<maxZone>29501</maxZone>
|
<maxZone>29501</maxZone>
|
||||||
<modifierZone>1412</modifierZone>
|
<modifierZone>1412</modifierZone>
|
||||||
<diagonalRange>90</diagonalRange>
|
<diagonalRange>90</diagonalRange>
|
||||||
<stickbutton index="7">
|
<squareStick>100</squareStick>
|
||||||
|
<stickbutton index="1">
|
||||||
<mousespeedx>74</mousespeedx>
|
<mousespeedx>74</mousespeedx>
|
||||||
<mousespeedy>74</mousespeedy>
|
<mousespeedy>74</mousespeedy>
|
||||||
<accelerationmultiplier>4</accelerationmultiplier>
|
<accelerationmultiplier>4</accelerationmultiplier>
|
||||||
@ -32,12 +33,26 @@
|
|||||||
<extraaccelerationcurve>easeoutquad</extraaccelerationcurve>
|
<extraaccelerationcurve>easeoutquad</extraaccelerationcurve>
|
||||||
<slots>
|
<slots>
|
||||||
<slot>
|
<slot>
|
||||||
<code>3</code>
|
<code>1</code>
|
||||||
<mode>mousemovement</mode>
|
<mode>mousemovement</mode>
|
||||||
</slot>
|
</slot>
|
||||||
</slots>
|
</slots>
|
||||||
</stickbutton>
|
</stickbutton>
|
||||||
<stickbutton index="6">
|
<stickbutton index="3">
|
||||||
|
<mousespeedx>74</mousespeedx>
|
||||||
|
<mousespeedy>74</mousespeedy>
|
||||||
|
<accelerationmultiplier>4</accelerationmultiplier>
|
||||||
|
<startaccelmultiplier>20</startaccelmultiplier>
|
||||||
|
<minaccelthreshold>3</minaccelthreshold>
|
||||||
|
<extraaccelerationcurve>easeoutquad</extraaccelerationcurve>
|
||||||
|
<slots>
|
||||||
|
<slot>
|
||||||
|
<code>4</code>
|
||||||
|
<mode>mousemovement</mode>
|
||||||
|
</slot>
|
||||||
|
</slots>
|
||||||
|
</stickbutton>
|
||||||
|
<stickbutton index="2">
|
||||||
<mousespeedx>74</mousespeedx>
|
<mousespeedx>74</mousespeedx>
|
||||||
<mousespeedy>74</mousespeedy>
|
<mousespeedy>74</mousespeedy>
|
||||||
</stickbutton>
|
</stickbutton>
|
||||||
@ -59,7 +74,7 @@
|
|||||||
<mousespeedx>74</mousespeedx>
|
<mousespeedx>74</mousespeedx>
|
||||||
<mousespeedy>74</mousespeedy>
|
<mousespeedy>74</mousespeedy>
|
||||||
</stickbutton>
|
</stickbutton>
|
||||||
<stickbutton index="3">
|
<stickbutton index="7">
|
||||||
<mousespeedx>74</mousespeedx>
|
<mousespeedx>74</mousespeedx>
|
||||||
<mousespeedy>74</mousespeedy>
|
<mousespeedy>74</mousespeedy>
|
||||||
<accelerationmultiplier>4</accelerationmultiplier>
|
<accelerationmultiplier>4</accelerationmultiplier>
|
||||||
@ -68,29 +83,15 @@
|
|||||||
<extraaccelerationcurve>easeoutquad</extraaccelerationcurve>
|
<extraaccelerationcurve>easeoutquad</extraaccelerationcurve>
|
||||||
<slots>
|
<slots>
|
||||||
<slot>
|
<slot>
|
||||||
<code>4</code>
|
<code>3</code>
|
||||||
<mode>mousemovement</mode>
|
<mode>mousemovement</mode>
|
||||||
</slot>
|
</slot>
|
||||||
</slots>
|
</slots>
|
||||||
</stickbutton>
|
</stickbutton>
|
||||||
<stickbutton index="2">
|
<stickbutton index="6">
|
||||||
<mousespeedx>74</mousespeedx>
|
<mousespeedx>74</mousespeedx>
|
||||||
<mousespeedy>74</mousespeedy>
|
<mousespeedy>74</mousespeedy>
|
||||||
</stickbutton>
|
</stickbutton>
|
||||||
<stickbutton index="1">
|
|
||||||
<mousespeedx>74</mousespeedx>
|
|
||||||
<mousespeedy>74</mousespeedy>
|
|
||||||
<accelerationmultiplier>4</accelerationmultiplier>
|
|
||||||
<startaccelmultiplier>20</startaccelmultiplier>
|
|
||||||
<minaccelthreshold>3</minaccelthreshold>
|
|
||||||
<extraaccelerationcurve>easeoutquad</extraaccelerationcurve>
|
|
||||||
<slots>
|
|
||||||
<slot>
|
|
||||||
<code>1</code>
|
|
||||||
<mode>mousemovement</mode>
|
|
||||||
</slot>
|
|
||||||
</slots>
|
|
||||||
</stickbutton>
|
|
||||||
<stickbutton index="8">
|
<stickbutton index="8">
|
||||||
<mousespeedx>74</mousespeedx>
|
<mousespeedx>74</mousespeedx>
|
||||||
<mousespeedy>74</mousespeedy>
|
<mousespeedy>74</mousespeedy>
|
||||||
@ -99,16 +100,25 @@
|
|||||||
<stick index="1">
|
<stick index="1">
|
||||||
<deadZone>2578</deadZone>
|
<deadZone>2578</deadZone>
|
||||||
<maxZone>30799</maxZone>
|
<maxZone>30799</maxZone>
|
||||||
<stickbutton index="7">
|
<stickbutton index="1">
|
||||||
<mouseacceleration>linear</mouseacceleration>
|
<mouseacceleration>linear</mouseacceleration>
|
||||||
<slots>
|
<slots>
|
||||||
<slot>
|
<slot>
|
||||||
<code>6</code>
|
<code>4</code>
|
||||||
<mode>mousebutton</mode>
|
<mode>mousebutton</mode>
|
||||||
</slot>
|
</slot>
|
||||||
</slots>
|
</slots>
|
||||||
</stickbutton>
|
</stickbutton>
|
||||||
<stickbutton index="6">
|
<stickbutton index="3">
|
||||||
|
<mouseacceleration>linear</mouseacceleration>
|
||||||
|
<slots>
|
||||||
|
<slot>
|
||||||
|
<code>7</code>
|
||||||
|
<mode>mousebutton</mode>
|
||||||
|
</slot>
|
||||||
|
</slots>
|
||||||
|
</stickbutton>
|
||||||
|
<stickbutton index="2">
|
||||||
<mouseacceleration>linear</mouseacceleration>
|
<mouseacceleration>linear</mouseacceleration>
|
||||||
</stickbutton>
|
</stickbutton>
|
||||||
<stickbutton index="5">
|
<stickbutton index="5">
|
||||||
@ -123,42 +133,33 @@
|
|||||||
<stickbutton index="4">
|
<stickbutton index="4">
|
||||||
<mouseacceleration>linear</mouseacceleration>
|
<mouseacceleration>linear</mouseacceleration>
|
||||||
</stickbutton>
|
</stickbutton>
|
||||||
<stickbutton index="3">
|
<stickbutton index="7">
|
||||||
<mouseacceleration>linear</mouseacceleration>
|
<mouseacceleration>linear</mouseacceleration>
|
||||||
<slots>
|
<slots>
|
||||||
<slot>
|
<slot>
|
||||||
<code>7</code>
|
<code>6</code>
|
||||||
<mode>mousebutton</mode>
|
<mode>mousebutton</mode>
|
||||||
</slot>
|
</slot>
|
||||||
</slots>
|
</slots>
|
||||||
</stickbutton>
|
</stickbutton>
|
||||||
<stickbutton index="2">
|
<stickbutton index="6">
|
||||||
<mouseacceleration>linear</mouseacceleration>
|
<mouseacceleration>linear</mouseacceleration>
|
||||||
</stickbutton>
|
</stickbutton>
|
||||||
<stickbutton index="1">
|
|
||||||
<mouseacceleration>linear</mouseacceleration>
|
|
||||||
<slots>
|
|
||||||
<slot>
|
|
||||||
<code>4</code>
|
|
||||||
<mode>mousebutton</mode>
|
|
||||||
</slot>
|
|
||||||
</slots>
|
|
||||||
</stickbutton>
|
|
||||||
<stickbutton index="8">
|
<stickbutton index="8">
|
||||||
<mouseacceleration>linear</mouseacceleration>
|
<mouseacceleration>linear</mouseacceleration>
|
||||||
</stickbutton>
|
</stickbutton>
|
||||||
</stick>
|
</stick>
|
||||||
<dpad index="1">
|
<dpad index="1">
|
||||||
<dpadbutton index="6">
|
<dpadbutton index="12">
|
||||||
<wheelspeedx>2</wheelspeedx>
|
<wheelspeedx>2</wheelspeedx>
|
||||||
<wheelspeedy>10</wheelspeedy>
|
<wheelspeedy>10</wheelspeedy>
|
||||||
</dpadbutton>
|
</dpadbutton>
|
||||||
<dpadbutton index="4">
|
<dpadbutton index="1">
|
||||||
<wheelspeedx>2</wheelspeedx>
|
<wheelspeedx>10</wheelspeedx>
|
||||||
<wheelspeedy>10</wheelspeedy>
|
<wheelspeedy>10</wheelspeedy>
|
||||||
<slots>
|
<slots>
|
||||||
<slot>
|
<slot>
|
||||||
<code>0x1000017</code>
|
<code>0x1000013</code>
|
||||||
<mode>keyboard</mode>
|
<mode>keyboard</mode>
|
||||||
</slot>
|
</slot>
|
||||||
</slots>
|
</slots>
|
||||||
@ -172,22 +173,22 @@
|
|||||||
<wheelspeedy>10</wheelspeedy>
|
<wheelspeedy>10</wheelspeedy>
|
||||||
<slots>
|
<slots>
|
||||||
<slot>
|
<slot>
|
||||||
<code>0x1000011</code>
|
<code>0x1000014</code>
|
||||||
<mode>keyboard</mode>
|
<mode>keyboard</mode>
|
||||||
</slot>
|
</slot>
|
||||||
</slots>
|
</slots>
|
||||||
</dpadbutton>
|
</dpadbutton>
|
||||||
<dpadbutton index="1">
|
<dpadbutton index="4">
|
||||||
<wheelspeedx>10</wheelspeedx>
|
<wheelspeedx>2</wheelspeedx>
|
||||||
<wheelspeedy>10</wheelspeedy>
|
<wheelspeedy>10</wheelspeedy>
|
||||||
<slots>
|
<slots>
|
||||||
<slot>
|
<slot>
|
||||||
<code>0x1000016</code>
|
<code>0x1000015</code>
|
||||||
<mode>keyboard</mode>
|
<mode>keyboard</mode>
|
||||||
</slot>
|
</slot>
|
||||||
</slots>
|
</slots>
|
||||||
</dpadbutton>
|
</dpadbutton>
|
||||||
<dpadbutton index="12">
|
<dpadbutton index="6">
|
||||||
<wheelspeedx>2</wheelspeedx>
|
<wheelspeedx>2</wheelspeedx>
|
||||||
<wheelspeedy>10</wheelspeedy>
|
<wheelspeedy>10</wheelspeedy>
|
||||||
</dpadbutton>
|
</dpadbutton>
|
||||||
@ -200,7 +201,7 @@
|
|||||||
<wheelspeedy>10</wheelspeedy>
|
<wheelspeedy>10</wheelspeedy>
|
||||||
<slots>
|
<slots>
|
||||||
<slot>
|
<slot>
|
||||||
<code>0x1000010</code>
|
<code>0x1000012</code>
|
||||||
<mode>keyboard</mode>
|
<mode>keyboard</mode>
|
||||||
</slot>
|
</slot>
|
||||||
</slots>
|
</slots>
|
||||||
@ -235,22 +236,6 @@
|
|||||||
</slot>
|
</slot>
|
||||||
</slots>
|
</slots>
|
||||||
</button>
|
</button>
|
||||||
<button index="5">
|
|
||||||
<slots>
|
|
||||||
<slot>
|
|
||||||
<code>1</code>
|
|
||||||
<mode>mousebutton</mode>
|
|
||||||
</slot>
|
|
||||||
</slots>
|
|
||||||
</button>
|
|
||||||
<button index="3">
|
|
||||||
<slots>
|
|
||||||
<slot>
|
|
||||||
<code>2</code>
|
|
||||||
<mode>mousebutton</mode>
|
|
||||||
</slot>
|
|
||||||
</slots>
|
|
||||||
</button>
|
|
||||||
<button index="2">
|
<button index="2">
|
||||||
<slots>
|
<slots>
|
||||||
<slot>
|
<slot>
|
||||||
@ -267,6 +252,30 @@
|
|||||||
</slot>
|
</slot>
|
||||||
</slots>
|
</slots>
|
||||||
</button>
|
</button>
|
||||||
|
<button index="4">
|
||||||
|
<slots>
|
||||||
|
<slot>
|
||||||
|
<code>0x1000004</code>
|
||||||
|
<mode>keyboard</mode>
|
||||||
|
</slot>
|
||||||
|
</slots>
|
||||||
|
</button>
|
||||||
|
<button index="3">
|
||||||
|
<slots>
|
||||||
|
<slot>
|
||||||
|
<code>2</code>
|
||||||
|
<mode>mousebutton</mode>
|
||||||
|
</slot>
|
||||||
|
</slots>
|
||||||
|
</button>
|
||||||
|
<button index="5">
|
||||||
|
<slots>
|
||||||
|
<slot>
|
||||||
|
<code>1</code>
|
||||||
|
<mode>mousebutton</mode>
|
||||||
|
</slot>
|
||||||
|
</slots>
|
||||||
|
</button>
|
||||||
</set>
|
</set>
|
||||||
</sets>
|
</sets>
|
||||||
</gamecontroller>
|
</gamecontroller>
|
Loading…
Reference in New Issue
Block a user