Project

General

Profile

unexist.dev

subtle

Assorted tidbits and projects

Gravity » History » Version 16

Anonymous, 10/18/2009 07:30 PM

1 16
h1. Gravity\015\012\015\012{{>toc}}\015\012\015\012Each Gravity has got a number of Rectangles which assign a certain placement on the screen.\015\012\015\012h2. Rectangles\015\012\015\012Rectangles 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.\015\012\015\012h2. How Rectangles are applied\015\012\015\012We took the intuitive approach, as clients are sized to w and h and the center is being 'pulled' to the gravity point.\015\012\015\012+Examples:+\015\012\015\012* TopLeft (x = 0, y = 0, h = 50, w = 50)\015\012  <pre>\015\012  +---+---+\015\012  | c |   |\015\012  +---+   |\015\012  |       |\015\012  +-------+\015\012  </pre>\015\012\015\012* Center (x=50, y = 50, h = 50, w = 50)\015\012  <pre>\015\012  +-------+\015\012  | +---+ |\015\012  | | c | |\015\012  | +---+ |\015\012  +-------+\015\012  </pre>\015\012\015\012h2. How you change Gravities\015\012\015\012h3. via [[config]]\015\012\015\012Check the default subtle.rb file, constant @GRAVITIES@.\015\012\015\012h3. via [[Grabs]]\015\012\015\012You 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.\015\012\015\012h3. via [[Subtlext]]\015\012\015\012You can set the Gravity via @client.gravity = object@, where @object@ may be:\015\012* an Integer (Gravity ID)\015\012* a Hash @{:gravity => Int, :mode => Int}@\015\012* a @Subtlext::Gravity@ object\015\012* a @Subtlext::Geometry@ object\015\012\015\012h3. via [[Subtler]]\015\012\015\012TODO\015\012\015\012\015\012{{tocnavi(subtle,Tags,Quickstart,Quickstart)}}