Updated gravities

Now with sane x and y values!
Added by Christoph Kappel about 1 year ago

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 ]

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