1j01 / tracky-mouse

Mouse control via head tracking, as a cross platform desktop app and JS library. eViacam alternative.
https://trackymouse.js.org/
MIT License
27 stars 5 forks source link

CLI arguments to adjust settings on the fly #62

Open 1j01 opened 1 month ago

1j01 commented 1 month ago

The CLI currently supports --start and --stop to control the running application. I want to add arguments to adjust the settings of the running application, to allow control by external applications such as a voice command system.

Something like:

  --profile PROFILE     The settings profile to use.
  --set OPTION VALUE    Change an option to a particular value. (Also outputs
                        the new value, which may be constrained to some
                        limits.)
  --adjust OPTION DELTA
                        Adjust an option by an amount relative to its current
                        value. (Also outputs the new value, which may be
                        constrained to some limits.)
  --get OPTION          Outputs the current value of an option.

or --increment and --decrement instead of --adjust (could still support negative numbers)

Should make sure to support changing multiple options in one command. Can return multiple option values separated by newlines.

The bulk of the work to support this will be refactoring the settings system. Right now there's duplicated code for serialization, and it's not very finessed in general.

There's a question of whether these flags should cause the settings to be saved, and my gut says they should be since this is for essentially automating moving the sliders and such, using voice control software, as the main use case.