Setting up double click title bar to maximize/minimize



So better snap tool has a function that allows you to double click on the title bar to maximize. If you double click it again it will minimize.

I have tried setting this up with BTT but I can't get it to work nicely. For example, if I try to assign double clicking on the title bar to zooming, it doesn't have the minimize function. I can also add the minimize function to the same action, but then it prompts me with which one I want.

Anyone have a tutorial for setting this up to behave like better snap tool?