I've now updated the patch to allow auto resize margins and using margins when it's in terminal frames. Sadly I couldn't find anything for detecting HDiPI frames, so the user must have to configure it.