Gravity¶
subtle uses a configureable grid system for window placement and the window slots inside of this grid are called gravity.
Values¶
Gravities are percentage values of the used screen and work view-wise for assigned tag. They consist of four values:
- X for placement in X direction
- Y for placement in Y direction
- WIDTH for window width
- HEIGHT for window height
Each value is a *percentage value of the screen width and height, that ensures that the same gravities work on any screen.
{{needs(2995)}}
Tiling¶
Since r2808, subtle supports gravity tiling - tiling of windows that share the same gravity. Up to now, this tiling could be enabled globally for all gravities and just worked horizontally. With the changes in r2995 it is possible to enable [Gravity#Tiling|gravity tiling]] per gravity either horizontally or vertically. That allows a greater deal of flexibility.
To use gravity tiling just add either :horz for horizontal tiling or :vert for vertical tiling to the gravity:
gravity :center, [ 25, 25, 50, 50 ], :horz
gravity :center33, [ 25, 25, 50, 33 ], :vert
Examples¶
Center¶
gravity :center, [ 25, 25, 50, 50 ]
+---------+ | | | +-----+ | | | | | | +-----+ | | | +---------+
Top left¶
gravity :top_left, [ 0, 0, 50, 50 ]
+----+----+ | | | | | | +----+ | | | | | +---------+
Bottom¶
gravity :bottom, [ 0, 50, 100, 50 ]
+---------+ | | | | +---------+ | | | | +---------+