Candle2 icon indicating copy to clipboard operation
Candle2 copied to clipboard

support multiple machine-specific configurations ("profiles")

Open scgtrp opened this issue 11 months ago • 1 comments

This makes Candle2 usable for driving multiple machines from the same computer, by making separate copies of the entire config file per machine.

By default, nothing will change; the file format is unchanged, and the current configuration is treated as a default profile. If multiple profiles are present at startup, the user is prompted to select one. If the environment variable $CANDLE_PROFILE is present and non-empty, that profile is used without prompting.

Profiles are stored in the app config directory, as urlencode(profilename) + ".ini". (URL-encoding the names allows profiles to be named without regard for the platform's file naming rules.)

There is currently no UI for managing profiles; they may be created by manually copying settings.ini to a new file in the same directory, or by setting $CANDLE_PROFILE to a profile that does not yet exist (it will be created with default settings).

scgtrp avatar Feb 28 '24 03:02 scgtrp

My use case here is that I have two GRBL machines now, a laser engraver and a CNC router, and I wanted different user command buttons for each.

I'm not opposed to adding a UI for this; I didn't in this PR because (1) I wanted to make sure you're okay with this before I go expanding on it, and (2) UI design is hard and I don't feel like doing it tonight. :)

scgtrp avatar Feb 28 '24 03:02 scgtrp

Thx for the contribution

Schildkroet avatar Mar 06 '24 23:03 Schildkroet