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:
1 # Move a window with half the width and
2 # height of the screen to the screen center
3 gravity :center, [ 25, 25, 50, 50 ]
4
5 # Move a window with half the width and
6 # height of the screen to the top right corner
7 gravity :top_right, [ 50, 0, 50, 50]
8
9 # Show a window with 80% of the width and 10% of the
10 # height centered in the lower third of the screen
11 gravity :foo, [ 10, 80, 80, 10 ]
Comments