Giter Club home page Giter Club logo

Comments (4)

flozz avatar flozz commented on June 26, 2024

The CLI only supports one device: it is simple to implement this way (and it is rare to have multiple mice connected to a PC).

However, it is possible to force which mouse is detected using the RIVALCFG_PROFILE environment variable: https://flozz.github.io/rivalcfg/env.html#rivalcfg-profile

from rivalcfg.

Aditya-Tolikar avatar Aditya-Tolikar commented on June 26, 2024

Thanks, looks like I can use RIVALCFG_PROFILE along with the debug output to implement multiple device support in a GUI.
Another related question here, though, is how to determine which of the endpoints given by rivalcfg --print-debug to set in the environment variable.

from rivalcfg.

flozz avatar flozz commented on June 26, 2024

Another related question here, though, is how to determine which of the endpoints given by rivalcfg --print-debug to set in the environment variable.

All endpoints of the same device have the same VendorID and ProductID. The exact endpoint to use is determined internally by Rivalcfg (it is configured in devices profiles).

But to list all available devices, please do not use the output of --print-debug. It is meant for human and subject to change if I need to print more info one day...

Instead you can use the Python API (you can call directly some Python code from the CLI):

python -c "import json ; import rivalcfg.devices ; print(json.dumps(list(rivalcfg.devices.list_plugged_devices())))"

This will give you a standard JSON output that will be easier to parse:

[{"vendor_id": 4152, "product_id": 5929, "name": "SteelSeries Rival 110"}]

from rivalcfg.

Aditya-Tolikar avatar Aditya-Tolikar commented on June 26, 2024

Thanks, I'll do it this way then.
Perhaps I should start with the python API itself.

from rivalcfg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.