I often split my workspace into four equally-sized rectangles, call them UL, UR, LL, and LR for upper left, etc.
You could test for a frame exactly in line with your current frame in some direction.
Like this: http://silenceisdefeat.org/~chv/ion3/grid_motion.lua It would seem annoying in some circumstances, though.
