Using Processing while Tethering {SOLVED}

Maybe I should look into scripting this

The Lua scripting in darktable is very limited. You can’t change image parameters with it and you don’t have an event when a photo is shot in tethered mode. Off cause darktable is open source and you can improve it.

Perhaps the best thing is to tell us, what your goal is. The more information we have, the easier is it to help. For me it sounds like a photo box.
Perhaps https://entangle-photo.org/ is interesting for you.