Updated gravities
Now with sane x and y values!
I really have no idea, when/why I introduced the odd calculation of the x and y value of gravities. In fact it is really difficult and most of my custom gravities are a product of trial'n'error.
Therefore r2829 removes the odd logic and replaces it by something understandable:
- X value is the screen width in percent used for placement in X direction
- Y value is the screen height in percent used for placement in Y direction
- WIDTH value is the screen width in percent
- HEIGHT value is the screen height in percent
Here are some example:
# Move a window with half the width and
# height of the screen to the screen center
gravity :center, [ 25, 25, 50, 50 ]
# Move a window with half the width and
# height of the screen to the top right corner
gravity :top_right, [ 50, 0, 50, 50]
# Show a window with 80% of the width and 10% of the
# height centered in the lower third of the screen
gravity :foo, [ 10, 80, 80, 10 ]
{{warn(The consequences of this change are, that you need to replace all current gravities by the ones in the default config and/or you need to re-do all custom created gravities.)}}
Comments