« Previous - Version 18/25 (diff) - Next » - Current version
Simon Hafner, 2009-10-20 23:13
:%s/Geometry/Rectangle/g might serve better ;)


Gravity

Each Gravity has got a number of Rectangles which assign a certain placement on the screen.

Rectangles

Rectangles are the subtle way to arrange clients. Each client has to be assigned to one Gravity and one of those Rectangles. These Rectangle are defined by a quadtuple x | y | width | height where x and y are the screen position in percent from the top left, x being down and y being left. Width and Height are the sizes of the client relative to the screen size.

How Rectangles are applied

We took the intuitive approach, as clients are sized to w and h and the center is being 'pulled' to the gravity point.

Examples:

  • TopLeft (x = 0, y = 0, h = 50, w = 50)
      +---+---+
      | c |   |
      +---+   |
      |       |
      +-------+
      
  • Center (x=50, y = 50, h = 50, w = 50)
      +-------+
      | +---+ |
      | | c | |
      | +---+ |
      +-------+
      

How you change Gravities

via config

Check the default subtle.rb file, constant GRAVITIES.

via Grabs

You can set a Gravity by default by pressing Super and the numlock key in direction you desire your window to be. Pressing again the same Grab will result in cycling through the rectangles.

via Subtlext

You can set the Gravity via client.gravity = object, where object may be:
  • an Integer (Gravity ID)
  • a Hash {:gravity => Int, :geometry => Int}
  • a Subtlext::Gravity object
  • a Subtlext::Rectangle object

via Subtler

TODO

{{tocnavi(subtle,Tags,Quickstart,Quickstart)}}