Maximize on mouse release over area of desktop

I’m interested in configuring a maximize function which runs on mouse release of a move within a particular area of a desktop. Say I drag a window to Y axis of 0 to 8 on a 1x1 desktop and release within that range, run a maximize function.

What are some angles I can approach this?

You can use something like this:

DestroyFunc Foo
AddToFunc Foo
+ I PipeRead `echo Move`
+ I PipeRead `[ $[pointer.x] -le 3 ] && [ $[pointer.y] -ge 222 ] && { echo "DoThis"; } || { echo "DoThat"; }`

The thing to note here is that the first PipeRead will block which is what you want when trying to compare the poiner position afterwards.

HTH,
Thomas