Prevent reset of overwrite vs. create unique filename

So I know the reason that darktable resets the “ovewrite” setting after each export session (to prevent loss of data). But given that I almost never use the “create unique filename” setting, is there a way I can script this via Lua to set it to “overwrite” by default?

1 Like

Nope, that is not possible.

Hmm, okay. So is there any way to make it less tedious? I keep having to go and reset it whenever I want to export and thus I can’t just select a bunch of images and hit Ctrl-e to export. In turn, this means I need the right sidebar enabled most of the time, which decreases the size of the previews (which means I can’t fit as many on a row without losing too much detail). Can I bind a shortcut (e.g. Ctrl-Shift-e) to exporting while overwriting? Or can I set a hotkey to change that particular setting?

Alternatively, could I use darktable.register_storage to create a new type of storage which overwrites by default?

I don’t think you can set that flag from Lua. You could of course delete the file first and then have them written in a script, but I don’t know how well that would work and if Lua has access to the filenames prior to export to the final file.

Hmm, yeah - that’s what I thought after I looked through the Lua API a bit.

What about registering a new type of storage which just eschews the check altogether (instead of using “disk”, I could then use that one)?