Looks like a command name before the current ratbag-command one, and since
this is a static method anyway just usage() will do.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Put the code in place for a multi-command tool, first command is
ratbag-command info /path/to/device
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Same as libinput. Since we need to open device files we need something that's
authorized to open them. So we punt that to the caller.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
We don't need the evdev fd, it's more flexible to start with a udev device.
This changes ratbag-command to take a /sys path as well, but for not it'll
do.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Problem is the current implementation requires to actually get the profile
before accessing the buttons. But it may be the simplest and safest way.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Most gaming mice use a specific HID protocol to configure the device.
Allow to retrieve the hidraw node associated to the mouse so we can talk
to it.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>