NsCDE does the tiling nicely both vertically and horizontally.
FvwmRearrange -tile $0 -r -mn 3 -maximize 0 0 $[wa.width]p $[wa.height]p
#vertical
FvwmRearrange -tile $0 -r -mn 2 -maximize 0 0 $[wa.width]p $[wa.height]p
#horizontal
I couldn’t find, how does NsCDE restore the tiling of all windows? Without, double-clicking each window individually.