Commit Graph

1590 Commits

Author SHA1 Message Date
Peter Hutterer
ec835e2e82 data: rename the MX master svg to drop the underscore
More consistent with the rest of the files

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-12-19 09:21:36 +01:00
Peter Hutterer
b86211204c tools: make ratbagctl bold in the man page
And a double-space to single-space change snuck in as well

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-12-19 11:51:52 +10:00
Lukas Werling
1d6995be72 Add Logitech MX Master 2S 2018-12-18 16:15:28 +10:00
Aleksandar Trifunovic
536576fe8b meson: conditional check to avoid use of depricated features after Meson v0.48.0 2018-12-17 18:04:37 +00:00
Peter Hutterer
b514f49b08 tools: sync ratbagd from Piper
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-12-13 11:58:49 +10:00
Aleksandar Trifunovic
46a466ffe1 Fix Logitech G Pro commit 2018-12-13 08:23:30 +10:00
Aleksandar Trifunovic
15f1667fa4 Add Logitech G Pro Wireless 2018-12-13 08:23:30 +10:00
Peter Hutterer
284c13b2fe ratbagd: update all properties before sending out Resync
Fixes #528

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-12-11 11:09:14 +10:00
Peter Hutterer
e9bb4f98ae ratbagd: make Commit() truly asynchronous
Schedule the actual operation as a callback to handle at the end of the event
loop and return success. The Resync signal will handle the rest.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-12-11 11:08:56 +10:00
Peter Hutterer
45b8d792cc meson.build: add the new device files to meson.build
A few of the device files didn't get installed, let's add them to the list.
This reshuffles the list a bit because the easiest way to make sure all files
are included is to run git ls-files, so let's stick to that.

Fixes #552

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-12-11 11:08:11 +10:00
Peter Hutterer
b93dfcfda4 data: add helper functions for checking list contents
Easier to print the lists instead of just failing

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-12-11 11:08:11 +10:00
Peter Hutterer
3ffdc8daa0 Revert "Add Logitech G Pro wired configuration (#555)"
This wasn't added to the meson.build file so the test didn't run on it. And
the test fails. Issues found include:

- DPIRange and DPIList must not be in the Device section
- Only one of those two, not both
- The svg file was in the 'default' theme rather than in gnome

This needs to be fixed first, not sure how this would've worked at all.

This reverts commit 2371960a1d.
2018-12-04 16:34:02 +10:00
Peter Hutterer
e38bc7a760 ratbagd: set up a simple exit-on-idle
ratbagd is not something that needs stay around forever just because we
configured a mouse once. We have DBus activation and we don't store anything
anyway, so we might as well exit after a period of inactivity (20 min).

There's a slight race condition where if something comes in at exactly the
20min mark, we may shut down anyway and the messages get lost. This is too
narrow to worry about.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-11-28 09:33:16 +01:00
Peter Hutterer
2dca516afa data: check for missing buttons
The Logitech G502 had a wrong button ID so it doesn't show up. We have a
correctly named leader and path though so let's add that to the checks.

https://github.com/libratbag/piper/issues/240

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-11-28 09:18:50 +01:00
Peter Hutterer
b489ac871d data: fix the Logitech G502 button 10 label
Fixes https://github.com/libratbag/piper/issues/240

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-11-28 09:18:50 +01:00
Peter Hutterer
50fb898138 roccat: set the dpi list
Turns out this driver never got updated for the 'new' DPI list provided by
libratbag and thus broke with bacdab2596 when we
enforced that DPI list.

Set a fixed DPI list based on the hardcoded values we use elsewhere in this
driver.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-11-28 09:08:24 +01:00
Peter Hutterer
c676fcefb1 README: minor improvements (#565)
Notable: parts of the instructions have been punted to the wiki now where it's
faster to edit and be verbose about the specific instructions.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-11-27 10:55:24 +10:00
Peter Hutterer
bb4dd2aae0 data: fix Logitech g600 button 6/7 assignment (#564)
Fixes #550

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-11-27 08:03:51 +10:00
Benjamin Tissoires
9b11340e91 Revert "circle CI: switch to ubuntu 18.10"
This reverts commit 874d7eccb8.

Looks like 18.10 fails at every pipeline build, so better
punting this for later.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2018-11-26 09:38:11 +01:00
Peter Hutterer
3cd5a1f986 hidpp20: if a command returns with error, return a neg errno
I'm pretty sure all callers rely on this command to return either 0 or a
negative errno. There's a quirky occasion where if we get a HID error (a
positive number) during hidpp20_special_keys_buttons_get_reporting, that
number eventually ends up as the 'num_controls' value in
hidpp20_special_key_mouse_get_controls().

Since the only time we care about HID++ errors is during
hidpp20_root_get_protocol_version, let's just always return -EPROTO on HID++
errors.

Fixes #558

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-11-26 09:27:35 +01:00
Peter Hutterer
874d7eccb8 circle CI: switch to ubuntu 18.10
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-11-26 09:25:08 +01:00
Erol Gorancic
44c4b901e2 Steelseries Rival 600 Support.
- New svg and device file. Updated meson.build.
- New device version (version 3).
- Refactored led cycle to be general for v2 and v3.
- New defines for v3.
2018-11-26 01:27:17 +00:00
mike391
2371960a1d Add Logitech G Pro wired configuration (#555) 2018-11-26 11:25:17 +10:00
Mateusz Maćkowski
874aa8e63e Add support for Logitech G502 HERO (#559)
* Add support for Logitech G502 HERO
2018-11-26 11:24:41 +10:00
Peter Hutterer
1225f421c0 circle CI: switch fedora latest to fedora 28
Some change in F29 breaks the CI runs, so lets switch back to what we had
before so we can merge patches.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-11-26 11:17:25 +10:00
Peter Hutterer
5f0f5d2843 driver-hidpp10: force the single profile to be active
If we can successfully read a profile but hidpp10_get_current_profile() fails
we end up with one profile, but not set to active. Fix this by always forcing
the single profile to be active.

Fixes #526
2018-11-26 11:11:42 +10:00
Peter Hutterer
1d464767e1 tools: fix error code names in ratbagd.py documentation 2018-09-27 09:44:05 +10:00
Peter Hutterer
9551dddbb8 tools: handle NULL svgs in ratbag-command
Showed up in #526
https://github.com/libratbag/libratbag/issues/526#issuecomment-420016451
2018-09-27 09:39:44 +10:00
Peter Hutterer
563c274705 tools: remove the unnecessary prefix from the error code enum
It's already encoded as part of the enum, no need to have it again for the
value
2018-09-26 13:17:36 +02:00
jit26
71ed64a843 Add Logitech G PowerPlay wireless configuration
Tested with a Logitech G903, should also work with a Logitech G703.
May also work with other Logitech mice that work with a G900 receiver.
2018-09-24 17:14:54 +01:00
Timofey Titovets
efb3efc828 Update Logitech G900 wireless config - add G903
Signed-off-by: Timofey Titovets <timofey.titovets@synesis.ru>
2018-09-18 14:51:11 +10:00
Timofey Titovets
982e6cc7fe Add Logitech G903 wired configuration
Signed-off-by: Timofey Titovets <timofey.titovets@synesis.ru>
2018-09-18 14:51:11 +10:00
Peter Hutterer
44dc754e31 meson.build: add hacks to be able to run coverity
Taken from libinput, we need to define a few gcc7 types that coverity doesn't
know about. To submit a coverity build, run meson with -Dcoverity=true

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-09-14 11:04:59 +02:00
Peter Hutterer
18887e4c86 meson_options: use a consistent style
Move the closing ) up to match the other options
2018-09-14 11:04:59 +02:00
Peter Hutterer
46d5fae2e5 tools: ratbagc - allow for the device to be just 'event7'
ratbagctl requires 'eventX' as argument, but ratbag-command requires
/dev/input/eventX. That's not smart, let's do better.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-09-14 10:23:11 +10:00
Peter Hutterer
4b31945e1d tools: change the exception to just RatbagdUnavailable
ratbag-command has an 'except RatbagdDBusUnavailable' line despite that class
never being defined. That's ok because we'll never throw it in this case but
it's still confusing (to flake8). So let's change the class name to something
more generic and define it in ratbagc.py

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-09-14 10:23:11 +10:00
Peter Hutterer
7e685f5196 tools: fix flake8 warnings about missing double empty lines 2018-09-13 10:51:15 +10:00
Andreas Heider
050db150f6 Add device match for MX Master 2018-09-10 17:54:03 +10:00
Peter Hutterer
a3de0e1ff7 ratbagd: provide a decent error message when the bus name is taken
sd-bus returns EEXISTS which is "File exists" and way too confusing. Let's
print out a decent error message for that case.

Relater #535
2018-09-10 04:15:01 +01:00
Peter Hutterer
acc0066f08 meson.build: add comments and tidy up a bit
Add some comments to make it slightly more obvious how the tools are being put
together.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-09-06 13:33:58 +02:00
Peter Hutterer
eb9f98e58d tools: ratbagc - set the LIBRATBAG_DATA_DIR environment before context start
This way we use the data files from the source directory, not the installed
ones.

Fixes #530

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-09-06 13:33:58 +02:00
Peter Hutterer
6d996bf1aa tools: add get_svg_fd() to ratbagc
Missing from 6000688c30

Fixes #31

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-09-06 13:33:58 +02:00
Peter Hutterer
34fbfe105c tools: return the full svg path for ratbagc get_svg()
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-09-06 13:33:58 +02:00
Peter Hutterer
dfeac1bcbc tools: generate ratbagc.py from configuration_data()
No functional changes, this is prep work only

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-09-06 13:33:58 +02:00
Peter Hutterer
3d345570eb meson.build: libratbag 0.9.903
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
v0.9.903
2018-09-05 08:41:26 +10:00
Peter Hutterer
6000688c30 ratbagd: add GetSvgFd() to return an fd to the SVG
If we're sandboxing the client we don't have access to the SVG files directly.
So pass a read-only file descriptor to the client over DBus and let them deal
with the SVG that way.

In ratbagd.py we pull the fd off but we convert the quirky dbus error into a
normal FileNotFoundError(), much easier to catch in the caller.

On the ratbagctl side we now have to search the SVG for it's name - stored in
the 'sodipodi:docname' attribute by Inkspace. This isn't guaranteed to exist
or be always correct, but meh, it's close enough. We could continue to use the
GetSvg() call here but I want to deprecate that and remove it in the near
future.

Fixes #521

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-09-05 08:31:35 +10:00
Rasmus Thomsen
9b409822c3 build: support building with elogind 2018-09-04 13:51:01 +10:00
FFY00
363eab80f0 steelseries: implement cycle struct 2018-09-01 22:49:32 +02:00
Peter Hutterer
66fc7b545e meson_options: fix indentation 2018-08-31 09:06:05 +10:00
Peter Hutterer
bb4b673df8 Drop the unused libratbag-version.h
Unused since 558f59b52c

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-08-30 08:20:23 +02:00