There’s been an interesting and useful commit in the FVWM CVS repository today. It introduces a new style of PositionPlacement which merges the CenterPlacement and UnderMousePlacement styles, and allows for placing a window at a known position (like the commands the Move command accepts).
This has useful implications since it will mean there’s now no need to use things like:
DestroyModuleConfig a:* *a: add_window "ThisWindow (some_window_name) Move 120 890"
You can just do:
Style some_window_name PositionPlacement 129 890
Quoting as an excerpt from the email sent to fvwm-workers:
I have removed these two styles and replaced them with the much more general style "PositionPlacement". Old styles CenterPlacement UnderMousePlacement New styles PositionPlacement Center PositionPlacement UnderMouse PositionPlacement can do a lot more. You can give an argument that is interpreted like the arguments of the Move command. E.g. PositionPlacement -0 -0 places a window in the bottom right corner of the screen. Furthermore I generalized the syntax of the move arguments: position[offset]... Where "position" can be any string in the old syntax. The new suffix 'w' means percent of window size. Any nubmer of offsets can be given and are interpreted like this: <n> or +<n> or ++<n> or --<n> plus <n> percent of screen size -<n> or +-<n> minus <n> percent of screen size <n>p or +<n>p or ++<n>p or --<n>p plus <n> pixels -<n> or +-<n> minus <n> pixels <n>w or +<n>w or ++<n>w or --<n>w plus <n> percent of window size -<n>w or +-<n>w minus <n> percent of window size Examples: * Move window to center of screen Move 50-50w 50-50w * Place center of new windows at 300 500 Style * PositionPlacement 300p-50w 500p-50w * Move a window down by 10% of its size + 3 pixels Move keep w+10w+3p * Move a window up by 10% of its size + 3 pixels Move keep w+-10w-3p
I highly recommend it.
– Thomas Adam