Most of what you want to do is in the gimprc and sessionrc files in your Gimp profile (and most of these settings are in Edit>Preferences).
No need for scripting, by design scripts cannot chant the UI anyway.
No need for scripting, by design scripts cannot chant the UI anyway.