Gravity

Version 24 (Lasse Christensen, 2011-05-15 18:40)

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 23 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 12 Simon Hafner
18 23 Christoph Kappel
h2. Examples
19 1
20 23 Christoph Kappel
h3. Center
21 22 Zafer CAKMAK
22 23 Christoph Kappel
<pre><code class="ruby">gravity :center, [ 25, 25, 50, 50 ]</code></pre>
23 22 Zafer CAKMAK
24 22 Zafer CAKMAK
25 23 Christoph Kappel
<pre>+---------+
26 23 Christoph Kappel
|         |
27 23 Christoph Kappel
| +-----+ |
28 23 Christoph Kappel
| |     | |
29 23 Christoph Kappel
| +-----+ |
30 23 Christoph Kappel
|         |
31 23 Christoph Kappel
+---------+</pre>
32 22 Zafer CAKMAK
33 23 Christoph Kappel
h3. Top left
34 22 Zafer CAKMAK
35 24 Lasse Christensen
<pre><code class="ruby">gravity :top_left, [ 0, 0, 50, 50 ]</code></pre>
36 22 Zafer CAKMAK
37 23 Christoph Kappel
<pre>+----+----+
38 23 Christoph Kappel
|    |    |
39 23 Christoph Kappel
|    |    |
40 23 Christoph Kappel
+----+    |
41 23 Christoph Kappel
|         |
42 23 Christoph Kappel
|         |
43 23 Christoph Kappel
+---------+</pre>
44 22 Zafer CAKMAK
45 23 Christoph Kappel
h3. Bottom
46 22 Zafer CAKMAK
47 24 Lasse Christensen
<pre><code class="ruby">gravity :bottom, [ 0, 50, 100, 50 ]</code></pre>
48 22 Zafer CAKMAK
49 23 Christoph Kappel
<pre>+---------+
50 23 Christoph Kappel
|         |
51 23 Christoph Kappel
|         |
52 23 Christoph Kappel
+---------+
53 23 Christoph Kappel
|         |
54 23 Christoph Kappel
|         |
55 23 Christoph Kappel
+---------+</pre>