FvwmRearrange old and new

FvwmRearrange rearranges fvwm windows. Option -mn that alters how the grid is computed with columns will be changed in v. 1.1.1.
How to keep old -mn and new -max_n in the same config, without conflict? To work on older fvwm versions and new one.

Example:

+ I FvwmRearrange -tile -r -mn 3 -maximize 0 0 86 82 # v1.1.0
+ I FvwmRearrange -tile -r -max_n 3 -maximize 0 0 86 82 # v1.1.1

v1.1.1 doesn’t work with the old option, no conflict. But v1.1.0 executes -tile causing a disorder. Any solution for this function to work on old and new?

+ I FvwmRearrange -tile -r -mn 3 -maximize 0 0 86 82 # v.1.1.0
+ I Test (Match) FvwmRearrange -tile -r -max_n 3 -maximize 0 0 86 82 # v.1.1.1

FvwmRearrange is just a breaking change, you probably need to test for which version of fvwm is being run and use the command based on that version. Though due to how ‘loosely’ FvwmRearrange parses values, you might get lucky enough to just always put the bounding box first and include both versions of the options. Though this is an ugly hack and will most likely spam your stderr with warnings.

Lucky fvwm includes a test for this, Test (Version >= 1.1.1) Command.

2 Likes