Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR] default UI configuration via config file #361

Closed
simonkuehling opened this issue Sep 21, 2021 · 2 comments · Fixed by #476
Closed

[FR] default UI configuration via config file #361

simonkuehling opened this issue Sep 21, 2021 · 2 comments · Fixed by #476
Assignees
Labels
💡 Type: Improve Requests an improvement
Milestone

Comments

@simonkuehling
Copy link

Is your feature request related to a problem? Please describe.
When deploying a custom built Klipper/Moonraker/Mainsail OS to a number of machines (that each run on a Raspi with a touch monitor attached), I miss having an option to pre-configure the UI through a config file - as all configuration in the interface is stored in the moonraker DB these days (right?)
This applies to the selection and order of the widgets as well as jogging speeds etc. for example.

Describe the solution you'd like
If I have researched correctly, the GUI settings have been stored in gui.json inside the sdcard directory before using the moonraker DB. How about re-introducing that file as a default config to populate the moonraker DB upon first start?

Describe alternatives you've considered
Have not come up with a workaroud yet - but, I am all ears if I‘m missing something!

@meteyou
Copy link
Member

meteyou commented Sep 21, 2021

hey! thx for your FR. gui.json was the old store of the gui settings. now all moved to the moonraker database.

but i already thought about such a function, that you can pass gui settings with an image and load them into the moonraker db the first time you load the gui.

you are welcome to come to our discord and we can discuss how we can implement such a solution. i can also send you test build then.

@meteyou meteyou added the 💡 Type: Improve Requests an improvement label Oct 31, 2021
@meteyou meteyou self-assigned this Dec 14, 2021
@meteyou meteyou added this to the v2.1.0 milestone Dec 14, 2021
@meteyou meteyou linked a pull request Dec 19, 2021 that will close this issue
@meteyou
Copy link
Member

meteyou commented Dec 19, 2021

hey @simonkuehling,

i created a PR for this feature (#476). do you have time to test it?

you can config your mainsail to your preferences and then create a backup. this backup can be used for a default mainsail settings file for a rpi image. you only have to add this file in /config/.theme/default.json. this will be loaded the first time, when you try to load mainsail and there is no mainsail db namespace in moonraker (and if you try to reset the mainsail DB).

you can find more informations of the structure of this file here:

export interface GuiState {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💡 Type: Improve Requests an improvement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants