Gravity

Version 25 (Christoph Kappel, 2011-08-09 21:07)

1 1
h1. Gravity
2 2 Christoph Kappel
3 12 Simon Hafner
{{>toc}}
4 12 Simon Hafner
5 23 Christoph Kappel
[[subtle]] uses a configureable grid system for window placement and the window slots inside of this grid are called [[gravity]].
6 12 Simon Hafner
7 23 Christoph Kappel
h2. Values
8 1
9 23 Christoph Kappel
[[Gravity|Gravities]] are percentage values of the used [[screen]] and work [[view]]-wise for assigned [[tagging|tag]]. They consist of four values:
10 1
11 23 Christoph Kappel
* *X* for placement in X direction
12 23 Christoph Kappel
* *Y* for placement in Y direction
13 23 Christoph Kappel
* *WIDTH* for window width
14 23 Christoph Kappel
* *HEIGHT* for window height
15 1
16 25 Christoph Kappel
Each value is a *percentage value of the screen width and height, that ensures that the same [[gravity|gravities]] work on any [[screen]].
17 25 Christoph Kappel
18 25 Christoph Kappel
{{needs(2995)}}
19 25 Christoph Kappel
20 25 Christoph Kappel
h2. Tiling
21 25 Christoph Kappel
22 25 Christoph Kappel
Since r2808, [[subtle]] supports [[Gravity#Tiling|gravity tiling]] - tiling of windows that share the same [[gravity]]. Up to now, this tiling could be enabled globally for all [[Gravity|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.
23 25 Christoph Kappel
24 25 Christoph Kappel
To use [[Gravity#Tiling|gravity tiling]] just add either *:horz* for horizontal tiling or *:vert* for vertical tiling to the [[gravity]]:
25 25 Christoph Kappel
26 25 Christoph Kappel
<pre><code class="ruby">
27 25 Christoph Kappel
gravity :center,   [ 25, 25, 50, 50 ], :horz
28 25 Christoph Kappel
gravity :center33, [ 25, 25, 50, 33 ], :vert
29 25 Christoph Kappel
</code></pre>
30 12 Simon Hafner
31 23 Christoph Kappel
h2. Examples
32 1
33 23 Christoph Kappel
h3. Center
34 22 Zafer CAKMAK
35 23 Christoph Kappel
<pre><code class="ruby">gravity :center, [ 25, 25, 50, 50 ]</code></pre>
36 22 Zafer CAKMAK
37 22 Zafer CAKMAK
38 23 Christoph Kappel
<pre>+---------+
39 23 Christoph Kappel
|         |
40 23 Christoph Kappel
| +-----+ |
41 23 Christoph Kappel
| |     | |
42 23 Christoph Kappel
| +-----+ |
43 23 Christoph Kappel
|         |
44 23 Christoph Kappel
+---------+</pre>
45 22 Zafer CAKMAK
46 23 Christoph Kappel
h3. Top left
47 22 Zafer CAKMAK
48 24 Lasse Christensen
<pre><code class="ruby">gravity :top_left, [ 0, 0, 50, 50 ]</code></pre>
49 22 Zafer CAKMAK
50 23 Christoph Kappel
<pre>+----+----+
51 23 Christoph Kappel
|    |    |
52 23 Christoph Kappel
|    |    |
53 23 Christoph Kappel
+----+    |
54 23 Christoph Kappel
|         |
55 23 Christoph Kappel
|         |
56 23 Christoph Kappel
+---------+</pre>
57 22 Zafer CAKMAK
58 23 Christoph Kappel
h3. Bottom
59 22 Zafer CAKMAK
60 24 Lasse Christensen
<pre><code class="ruby">gravity :bottom, [ 0, 50, 100, 50 ]</code></pre>
61 22 Zafer CAKMAK
62 23 Christoph Kappel
<pre>+---------+
63 23 Christoph Kappel
|         |
64 23 Christoph Kappel
|         |
65 23 Christoph Kappel
+---------+
66 23 Christoph Kappel
|         |
67 23 Christoph Kappel
|         |
68 23 Christoph Kappel
+---------+</pre>