Project

General

Profile

unexist.dev

subtle

Assorted tidbits and projects

Styles » History » Version 47

Christoph Kappel, 01/23/2018 12:24 PM

1 47 Christoph Kappel
h1. Styles
2 47 Christoph Kappel
3 47 Christoph Kappel
{{>toc}}
4 47 Christoph Kappel
5 47 Christoph Kappel
[[Styles]] are used to define various properties of [[Styles#styleable-items|styleable items]] in a "CSS-like":http://en.wikipedia.org/wiki/Cascading_Style_Sheets syntax.
6 47 Christoph Kappel
7 47 Christoph Kappel
h2. Box model
8 47 Christoph Kappel
9 47 Christoph Kappel
Every [[Styles#styleable-items|styleable items]] item consists of different boxes, whereas each box includes the previous one. The size of a box is determined by the size required to include the previous one and a value for each side of the box: *top*, *right*, *bottom*, *left* (_The values are ordered clockwise_)
10 47 Christoph Kappel
11 47 Christoph Kappel
Here is a layout for better understanding:
12 47 Christoph Kappel
13 47 Christoph Kappel
<pre>
14 47 Christoph Kappel
                                     Top
15 47 Christoph Kappel
     +-----------------------------------------------------------------+
16 47 Christoph Kappel
     |                              Margin                             |
17 47 Christoph Kappel
     |        +-----------------------------------------------+        |
18 47 Christoph Kappel
     |        |                     Border                    |        |
19 47 Christoph Kappel
     |        |        +-----------------------------+        |        |
20 47 Christoph Kappel
     |        |        |           Padding           |        |        |
21 47 Christoph Kappel
     |        |        |         +---------+         |        |        |
22 47 Christoph Kappel
Left | Margin | Border | Padding | Content | Padding | Border | Margin | Right
23 47 Christoph Kappel
     |        |        |         +---------+         |        |        |
24 47 Christoph Kappel
     |        |        |           Padding           |        |        |
25 47 Christoph Kappel
     |        |        +-----------------------------+        |        |
26 47 Christoph Kappel
     |        |                    Border                     |        |
27 47 Christoph Kappel
     |        +-----------------------------------------------+        |
28 47 Christoph Kappel
     |                             Margin                              |
29 47 Christoph Kappel
     +-----------------------------------------------------------------+
30 47 Christoph Kappel
                                   Bottom
31 47 Christoph Kappel
</pre>
32 47 Christoph Kappel
33 47 Christoph Kappel
The various [[Styles#Properties|properties]] of a [[Styles|style]] have different meanings for each box:
34 47 Christoph Kappel
35 47 Christoph Kappel
|_. Property                       |_. Meaning                                                    |
36 47 Christoph Kappel
| [[Styles#Foregorund|foreground]] | Sets the foreground color of the content box                 |
37 47 Christoph Kappel
| [[Styles#Background|background]] | Sets the background color of the content and the padding box |
38 47 Christoph Kappel
| [[Styles#Border|border]]         | Sets the background color of the border box (per side)       |
39 47 Christoph Kappel
40 47 Christoph Kappel
{{info(The margin box is always transparent.)}}
41 47 Christoph Kappel
42 47 Christoph Kappel
h2. Cascading
43 47 Christoph Kappel
44 47 Christoph Kappel
Like "CSS":http://en.wikipedia.org/wiki/Cascading_Style_Sheets syntax, [[styles]] in [[subtle]] support simple cascading. That means that properties set for [[Styles#All|All]] are inherited by other [[Styles#styleable-items|styleable items]].
45 47 Christoph Kappel
46 47 Christoph Kappel
h3. All
47 47 Christoph Kappel
48 47 Christoph Kappel
Defines properties for most of the styleable elements.
49 47 Christoph Kappel
50 47 Christoph Kappel
*Supported properties*: [[Styles#Foreground|Foreground]], [[Styles#Background|Background]], [[Styles#Margin|Margin]], [[Styles#Border|Border]], [[Styles#Padding|Padding]], [[Styles#Min_width|Min_width]], [[Styles#Icon|Icon]]
51 47 Christoph Kappel
52 47 Christoph Kappel
Example:
53 47 Christoph Kappel
54 47 Christoph Kappel
<pre><code class="ruby">style :all do
55 47 Christoph Kappel
  padding     0, 0, 0, 0
56 47 Christoph Kappel
  border      "#303030", 0
57 47 Christoph Kappel
  foreground  "#fecf35"
58 47 Christoph Kappel
  background  "#202020"
59 47 Christoph Kappel
end</code></pre>
60 47 Christoph Kappel
61 47 Christoph Kappel
{{needs(2979)}}
62 47 Christoph Kappel
63 47 Christoph Kappel
h2. Substyles
64 47 Christoph Kappel
65 47 Christoph Kappel
[[Styles]] can contain nested [[Styles|styles]], that inherit values from their parent. The default config uses this syntax to define styles for [[Styles#Focus|:focus]], [[Styles#Occupied|:occupied]], [[Styles#Unoccupied|:unoccupied]] and [[Styles#Urgent|:urgent]].
66 47 Christoph Kappel
67 47 Christoph Kappel
[[Sublets]] automatically check for a [[Styles#Substyles|substyle]] matching to their name and otherwise fallback to the [[Styles#Sublets|:sublets]] style.
68 47 Christoph Kappel
69 47 Christoph Kappel
h2. Styleable items
70 47 Christoph Kappel
71 47 Christoph Kappel
h3. Clients
72 47 Christoph Kappel
73 47 Christoph Kappel
Defines properties for active and inactive clients.
74 47 Christoph Kappel
75 47 Christoph Kappel
{{info(margin is the former :gap option)}}
76 47 Christoph Kappel
77 47 Christoph Kappel
*Supported properties*: [[Styles#Margin|Margin]], [[Styles#Active|Active]], [[Styles#Inactive|Inactive]], [[Styles#Width|Width]]
78 47 Christoph Kappel
79 47 Christoph Kappel
Example:
80 47 Christoph Kappel
81 47 Christoph Kappel
<pre><code class="ruby">style :clients do
82 47 Christoph Kappel
  active      "#303030", 2
83 47 Christoph Kappel
  inactive    "#202020", 2
84 47 Christoph Kappel
  margin      0
85 47 Christoph Kappel
  width       50
86 47 Christoph Kappel
end</code></pre>
87 47 Christoph Kappel
88 47 Christoph Kappel
h3. Separator
89 47 Christoph Kappel
90 47 Christoph Kappel
Defines properties for the panel separator.
91 47 Christoph Kappel
92 47 Christoph Kappel
*Supported properties*: [[Styles#Foreground|Foreground]], [[Styles#Background|Background]], [[Styles#Margin|Margin]], [[Styles#Border|Border]], [[Styles#Padding|Padding]], [[Styles#Min_width|Min_width]], [[Styles#Font|Font]], [[Styles#Separator|Separator]]
93 47 Christoph Kappel
94 47 Christoph Kappel
*Inherits from*: [[Styles#All|All]]
95 47 Christoph Kappel
96 47 Christoph Kappel
Example:
97 47 Christoph Kappel
98 47 Christoph Kappel
<pre><code class="ruby">style :separator do
99 47 Christoph Kappel
  padding     0, 0, 0, 0
100 47 Christoph Kappel
  border      0
101 47 Christoph Kappel
  background  "#202020"
102 47 Christoph Kappel
  foreground  "#757575"
103 47 Christoph Kappel
end</code></pre>
104 47 Christoph Kappel
105 47 Christoph Kappel
h3. Sublets
106 47 Christoph Kappel
107 47 Christoph Kappel
Defines properties for sublets in the panel.
108 47 Christoph Kappel
109 47 Christoph Kappel
*Supported properties*: [[Styles#Foreground|Foreground]], [[Styles#Background|Background]], [[Styles#Margin|Margin]], [[Styles#Border|Border]], [[Styles#Padding|Padding]], [[Styles#Min_width|Min_width]], [[Styles#Font|Font]]
110 47 Christoph Kappel
111 47 Christoph Kappel
*Inherits from*: [[Styles#All|All]]
112 47 Christoph Kappel
113 47 Christoph Kappel
Example:
114 47 Christoph Kappel
115 47 Christoph Kappel
<pre><code class="ruby">style :sublets do
116 47 Christoph Kappel
  padding     0, 0, 0, 0
117 47 Christoph Kappel
  border      "#303030", 0
118 47 Christoph Kappel
  foreground  "#757575"
119 47 Christoph Kappel
  background  "#202020"
120 47 Christoph Kappel
end</code></pre>
121 47 Christoph Kappel
122 47 Christoph Kappel
{{needs(3097)}}
123 47 Christoph Kappel
124 47 Christoph Kappel
h4. Separator
125 47 Christoph Kappel
126 47 Christoph Kappel
Defines properties for the [[sublets|sublet]] separator.
127 47 Christoph Kappel
128 47 Christoph Kappel
*Supported properties*: [[Styles#Foreground|Foreground]], [[Styles#Background|Background]], [[Styles#Margin|Margin]], [[Styles#Border|Border]], [[Styles#Padding|Padding]], [[Styles#Min_width|Min_width]], [[Styles#Font|Font]], [[Styles#Separator|Separator]]
129 47 Christoph Kappel
130 47 Christoph Kappel
*Inherits from*: [[Styles#Sublets|Sublets]]
131 47 Christoph Kappel
132 47 Christoph Kappel
Example:
133 47 Christoph Kappel
134 47 Christoph Kappel
<pre><code class="ruby">style :separator do
135 47 Christoph Kappel
  padding     0, 0, 0, 0
136 47 Christoph Kappel
  border      0
137 47 Christoph Kappel
  background  "#202020"
138 47 Christoph Kappel
  foreground  "#757575"
139 47 Christoph Kappel
end</code></pre>
140 47 Christoph Kappel
141 47 Christoph Kappel
h3. Subtle
142 47 Christoph Kappel
143 47 Christoph Kappel
Defines properties for [[subtle]].
144 47 Christoph Kappel
145 47 Christoph Kappel
{{info(padding is the former :strut option)}}
146 47 Christoph Kappel
147 47 Christoph Kappel
*Supported properties*: [[Styles#Background|Background]], [[Styles#Padding|Padding]], [[Styles#Panel|Panel]], [[Styles#Stipple|Stipple]]
148 47 Christoph Kappel
149 47 Christoph Kappel
Example:
150 47 Christoph Kappel
151 47 Christoph Kappel
<pre><code class="ruby">style :subtle do
152 47 Christoph Kappel
  panel       "#202020"
153 47 Christoph Kappel
  background  "#3d3d3d"
154 47 Christoph Kappel
  stipple     "#757575"
155 47 Christoph Kappel
end</code></pre>
156 47 Christoph Kappel
157 47 Christoph Kappel
h3. Title
158 47 Christoph Kappel
159 47 Christoph Kappel
Defines properties for the title of current [[Clients|client]].
160 47 Christoph Kappel
161 47 Christoph Kappel
*Supported properties*: [[Styles#Foreground|Foreground]], [[Styles#Background|Background]], [[Styles#Margin|Margin]], [[Styles#Border|Border]], [[Styles#Padding|Padding]], [[Styles#Min_width|Min_width]], [[Styles#Font|Font]]
162 47 Christoph Kappel
163 47 Christoph Kappel
*Inherits from*: [[Styles#All|All]]
164 47 Christoph Kappel
165 47 Christoph Kappel
Example:
166 47 Christoph Kappel
167 47 Christoph Kappel
<pre><code class="ruby">style :title do
168 47 Christoph Kappel
  padding     0, 0, 0, 0
169 47 Christoph Kappel
  border      "#303030", 0
170 47 Christoph Kappel
  foreground  "#fecf35"
171 47 Christoph Kappel
  background  "#202020"
172 47 Christoph Kappel
end</code></pre>
173 47 Christoph Kappel
174 47 Christoph Kappel
h3. Views
175 47 Christoph Kappel
176 47 Christoph Kappel
Defines properties for [[Views|view]]-related styleable elements.
177 47 Christoph Kappel
178 47 Christoph Kappel
*Supported properties*: [[Styles#Foreground|Foreground]], [[Styles#Background|Background]], [[Styles#Margin|Margin]], [[Styles#Border|Border]], [[Styles#Padding|Padding]], [[Styles#Min_width|Min_width]], [[Styles#Icon|Icon]], [[Styles#Font|Font]]
179 47 Christoph Kappel
180 47 Christoph Kappel
*Inherits from*: [[Styles#All|All]]
181 47 Christoph Kappel
182 47 Christoph Kappel
Example:
183 47 Christoph Kappel
184 47 Christoph Kappel
<pre><code class="ruby">style :views do
185 47 Christoph Kappel
  background  "#202020"
186 47 Christoph Kappel
end</code></pre>
187 47 Christoph Kappel
188 47 Christoph Kappel
h4. Focus
189 47 Christoph Kappel
190 47 Christoph Kappel
Defines properties for current active [[Views|view]].
191 47 Christoph Kappel
192 47 Christoph Kappel
*Supported properties*: [[Styles#Foreground|Foreground]], [[Styles#Background|Background]], [[Styles#Margin|Margin]], [[Styles#Border|Border]], [[Styles#Padding|Padding]], [[Styles#Min_width|Min_width]], [[Styles#Icon|Icon]], [[Styles#Font|Font]]
193 47 Christoph Kappel
194 47 Christoph Kappel
*Inherits from*: [[Styles#Views|Views]]
195 47 Christoph Kappel
196 47 Christoph Kappel
Example:
197 47 Christoph Kappel
198 47 Christoph Kappel
<pre><code class="ruby">style :focus do
199 47 Christoph Kappel
  padding     0, 0, 0, 0
200 47 Christoph Kappel
  border      "#303030", 0
201 47 Christoph Kappel
  foreground  "#fecf35"
202 47 Christoph Kappel
  background  "#202020"
203 47 Christoph Kappel
end</code></pre>
204 47 Christoph Kappel
205 47 Christoph Kappel
h4. Occupied
206 47 Christoph Kappel
207 47 Christoph Kappel
Defines properties for [[views]] with at least one [[Clients|client]].
208 47 Christoph Kappel
209 47 Christoph Kappel
*Supported properties*: [[Styles#Foreground|Foreground]], [[Styles#Background|Background]], [[Styles#Margin|Margin]], [[Styles#Border|Border]], [[Styles#Padding|Padding]], [[Styles#Min_width|Min_width]], [[Styles#Icon|Icon]], [[Styles#Font|Font]]
210 47 Christoph Kappel
211 47 Christoph Kappel
*Inherits from*: [[Styles#Views|Views]]
212 47 Christoph Kappel
213 47 Christoph Kappel
Example:
214 47 Christoph Kappel
215 47 Christoph Kappel
<pre><code cl<code class="ruby">style :occupied do
216 47 Christoph Kappel
  padding     0, 0, 0, 0
217 47 Christoph Kappel
  border      "#303030", 0
218 47 Christoph Kappel
  foreground  "#b8b8b8"
219 47 Christoph Kappel
  background  "#202020"
220 47 Christoph Kappel
end</code></pre>
221 47 Christoph Kappel
222 47 Christoph Kappel
h4. Urgent
223 47 Christoph Kappel
224 47 Christoph Kappel
Defines properties for [[views]] with urgent [[clients]].
225 47 Christoph Kappel
226 47 Christoph Kappel
*Supported properties*: [[Styles#Foreground|Foreground]], [[Styles#Background|Background]], [[Styles#Margin|Margin]], [[Styles#Border|Border]],  [[Styles#Padding|Padding]], [[Styles#Min_width|Min_width]], [[Styles#Icon|Icon]], [[Styles#Font|Font]]
227 47 Christoph Kappel
228 47 Christoph Kappel
*Inherits from*: {{info(This [[Styles|style]] doesn't inherit values and is used additionally to other [[Views|view]] [[styles]] like occupied.)}}
229 47 Christoph Kappel
230 47 Christoph Kappel
Example:
231 47 Christoph Kappel
232 47 Christoph Kappel
<pre><code class="ruby">style :urgent do
233 47 Christoph Kappel
  padding     0, 0, 0, 0
234 47 Christoph Kappel
  border      "#303030", 0
235 47 Christoph Kappel
  foreground  "#ff9800"
236 47 Christoph Kappel
  background  "#202020"
237 47 Christoph Kappel
end</code></pre>
238 47 Christoph Kappel
239 47 Christoph Kappel
{{needs(3023)}}
240 47 Christoph Kappel
241 47 Christoph Kappel
h4. Visible
242 47 Christoph Kappel
243 47 Christoph Kappel
Defines properties for [[views]] that are visible on any [[Multihead|screen]].
244 47 Christoph Kappel
245 47 Christoph Kappel
*Supported properties*: [[Styles#Foreground|Foreground]], [[Styles#Background|Background]], [[Styles#Margin|Margin]], [[Styles#Border|Border]],  [[Styles#Padding|Padding]], [[Styles#Min_width|Min_width]], [[Styles#Icon|Icon]], [[Styles#Font|Font]]
246 47 Christoph Kappel
247 47 Christoph Kappel
*Inherits from*: {{info(This [[Styles|style]] doesn't inherit values and is used additionally to other [[Views|view]] [[styles]] like occupied.)}}
248 47 Christoph Kappel
249 47 Christoph Kappel
Example:
250 47 Christoph Kappel
251 47 Christoph Kappel
<pre><code class="ruby">style :visible do
252 47 Christoph Kappel
  border-top "#303030", 2
253 47 Christoph Kappel
end</code></pre>
254 47 Christoph Kappel
255 47 Christoph Kappel
{{needs(3097)}}
256 47 Christoph Kappel
257 47 Christoph Kappel
h4. Separator
258 47 Christoph Kappel
259 47 Christoph Kappel
Defines properties for the [[views]] separator.
260 47 Christoph Kappel
261 47 Christoph Kappel
*Supported properties*: [[Styles#Foreground|Foreground]], [[Styles#Background|Background]], [[Styles#Margin|Margin]], [[Styles#Border|Border]], [[Styles#Padding|Padding]], [[Styles#Min_width|Min_width]], [[Styles#Font|Font]], [[Styles#Separator|Separator]]
262 47 Christoph Kappel
263 47 Christoph Kappel
*Inherits from*: [[Styles#Views|Views]]
264 47 Christoph Kappel
265 47 Christoph Kappel
Example:
266 47 Christoph Kappel
267 47 Christoph Kappel
<pre><code class="ruby">style :separator do
268 47 Christoph Kappel
  padding     0, 0, 0, 0
269 47 Christoph Kappel
  border      0
270 47 Christoph Kappel
  background  "#202020"
271 47 Christoph Kappel
  foreground  "#757575"
272 47 Christoph Kappel
end</code></pre>
273 47 Christoph Kappel
274 47 Christoph Kappel
h2. Properties
275 47 Christoph Kappel
276 47 Christoph Kappel
Following properties can be set for supported items:
277 47 Christoph Kappel
278 47 Christoph Kappel
h3. Foreground
279 47 Christoph Kappel
280 47 Christoph Kappel
This property sets the foreground/text color.
281 47 Christoph Kappel
282 47 Christoph Kappel
*Applicable to*: [[Styles#All|All]], [[Styles#Title|Title]], [[Styles#Focus|Focus]], [[Styles#Urgent|Urgent]], [[Styles#Occupied|Occupied]], [[Styles#Views|Views]], [[Styles#Sublets|Sublets]], [[Styles#Separator|Separator]], [[Styles#Visible|Visible]]
283 47 Christoph Kappel
284 47 Christoph Kappel
Example:
285 47 Christoph Kappel
286 47 Christoph Kappel
<pre><code class="ruby">
287 47 Christoph Kappel
style :title do
288 47 Christoph Kappel
  foreground "#fecf35"
289 47 Christoph Kappel
end</code></pre>
290 47 Christoph Kappel
291 47 Christoph Kappel
h3. Background
292 47 Christoph Kappel
293 47 Christoph Kappel
This property sets the background color.
294 47 Christoph Kappel
295 47 Christoph Kappel
*Applicable to*: [[Styles#All|All]], [[Styles#Title|Title]], [[Styles#Focus|Focus]], [[Styles#Urgent|Urgent]], [[Styles#Occupied|Occupied]], [[Styles#Views|Views]], [[Styles#Sublets|Sublets]], [[Styles#Separator|Separator]], [[Styles#Visible|Visible]]
296 47 Christoph Kappel
297 47 Christoph Kappel
Example:
298 47 Christoph Kappel
299 47 Christoph Kappel
<pre><code class="ruby">
300 47 Christoph Kappel
style :title do
301 47 Christoph Kappel
  background "#202020"
302 47 Christoph Kappel
end</code></pre>
303 47 Christoph Kappel
304 47 Christoph Kappel
{{needs(3066)}}
305 47 Christoph Kappel
306 47 Christoph Kappel
h3. Font
307 47 Christoph Kappel
308 47 Christoph Kappel
This property sets the font and expects a string. The font string can either be from "xfontsel":http://www.xfree86.org/4.2.0/xfontsel.1.html or a valid "XFT":http://en.wikipedia.org/wiki/Xft font description.
309 47 Christoph Kappel
310 47 Christoph Kappel
*Applicable to*: [[Styles#All|All]], [[Styles#Title|Title]], [[Styles#Focus|Focus]], [[Styles#Urgent|Urgent]], [[Styles#Occupied|Occupied]], [[Styles#Views|Views]], [[Styles#Sublets|Sublets]], [[Styles#Separator|Separator]], [[Styles#Visible|Visible]]
311 47 Christoph Kappel
312 47 Christoph Kappel
Example:
313 47 Christoph Kappel
314 47 Christoph Kappel
<pre><code class="ruby">
315 47 Christoph Kappel
style :all do
316 47 Christoph Kappel
  font  "-*-*-*-*-*-*-14-*-*-*-*-*-*-*"
317 47 Christoph Kappel
  #font "xft:sans-8"
318 47 Christoph Kappel
end</code></pre>
319 47 Christoph Kappel
320 47 Christoph Kappel
h3. Margin
321 47 Christoph Kappel
322 47 Christoph Kappel
This property sets a transparent (no background) outer spacing in given directions. Following notations are supported:
323 47 Christoph Kappel
324 47 Christoph Kappel
| <code class="ruby">margin        2</code>          | Set space for all four directions                                   |
325 47 Christoph Kappel
| <code class="ruby">margin        2, 2</code>       | Set space for top/bottom and left/right                             |
326 47 Christoph Kappel
| <code class="ruby">margin        2, 2, 2</code>    | Set space for top, left/right and bottom (top, right, bottom, left) |
327 47 Christoph Kappel
| <code class="ruby">margin        2, 2, 2, 2</code> | Set space for all four directions                                   |
328 47 Christoph Kappel
| <code class="ruby">margin_top    2</code>          | Set space for top side                                              |
329 47 Christoph Kappel
| <code class="ruby">margin_right  2</code>          | Set space for right side                                            |
330 47 Christoph Kappel
| <code class="ruby">margin_bottom 2</code>          | Set space for bottom side                                           |
331 47 Christoph Kappel
| <code class="ruby">margin_left   2</code>          | Set space for left side                                             |
332 47 Christoph Kappel
333 47 Christoph Kappel
*Applicable to*: [[Styles#All|All]], [[Styles#Title|Title]], [[Styles#Focus|Focus]], [[Styles#Urgent|Urgent]], [[Styles#Occupied|Occupied]], [[Styles#Views|Views]], [[Styles#Sublets|Sublets]], [[Styles#Separator|Separator]], [[Styles#Visible|Visible]]
334 47 Christoph Kappel
335 47 Christoph Kappel
Example:
336 47 Christoph Kappel
337 47 Christoph Kappel
<pre><code class="ruby">
338 47 Christoph Kappel
style :title do
339 47 Christoph Kappel
  margin 2
340 47 Christoph Kappel
end
341 47 Christoph Kappel
342 47 Christoph Kappel
style :title do
343 47 Christoph Kappel
  margin 2, 2
344 47 Christoph Kappel
end
345 47 Christoph Kappel
346 47 Christoph Kappel
style :title do
347 47 Christoph Kappel
  margin_top 2
348 47 Christoph Kappel
end</code></pre>
349 47 Christoph Kappel
350 47 Christoph Kappel
h3. Border
351 47 Christoph Kappel
352 47 Christoph Kappel
This property sets the border color and size. Following notations are supported:
353 47 Christoph Kappel
354 47 Christoph Kappel
| <code class="ruby">border        "#303030", 0</code> | Set border color and size of all four borders  |
355 47 Christoph Kappel
| <code class="ruby">border_top    "#303030", 0</code> | Set border color and size of top border        |
356 47 Christoph Kappel
| <code class="ruby">border_right  "#303030", 0</code> | Set border color and size of right border      |
357 47 Christoph Kappel
| <code class="ruby">border_bottom "#303030", 0</code> | Set border color and size of bottom border     |
358 47 Christoph Kappel
| <code class="ruby">border_left   "#303030", 0</code> | Set border color and size of left border       |
359 47 Christoph Kappel
360 47 Christoph Kappel
*Applicable to*: [[Styles#All|All]], [[Styles#Title|Title]], [[Styles#Focus|Focus]], [[Styles#Urgent|Urgent]], [[Styles#Occupied|Occupied]], [[Styles#Views|Views]], [[Styles#Sublets|Sublets]], [[Styles#Separator|Separator]], [[Styles#Visible|Visible]]
361 47 Christoph Kappel
362 47 Christoph Kappel
Example:
363 47 Christoph Kappel
364 47 Christoph Kappel
<pre><code class="ruby">
365 47 Christoph Kappel
style :title do
366 47 Christoph Kappel
  border "#303030", 0
367 47 Christoph Kappel
end
368 47 Christoph Kappel
369 47 Christoph Kappel
style :title do
370 47 Christoph Kappel
  border_top    "#303030", 0
371 47 Christoph Kappel
end</code></pre>
372 47 Christoph Kappel
373 47 Christoph Kappel
h3. Padding
374 47 Christoph Kappel
375 47 Christoph Kappel
This property sets an inner spacing between border and content in given directions. Following notations are supported:
376 47 Christoph Kappel
377 47 Christoph Kappel
| <code class="ruby">padding        2</code>          | Set space for all four directions                                   |
378 47 Christoph Kappel
| <code class="ruby">padding        2, 2</code>       | Set space for top/bottom and left/right                             |
379 47 Christoph Kappel
| <code class="ruby">padding        2, 2, 2</code>    | Set space for top, left/right and bottom (top, right, bottom, left) |
380 47 Christoph Kappel
| <code class="ruby">padding        2, 2, 2, 2</code> | Set space for all four directions                                   |
381 47 Christoph Kappel
| <code class="ruby">padding_top    2</code>          | Set space for top side                                              |
382 47 Christoph Kappel
| <code class="ruby">padding_right  2</code>          | Set space for right side                                            |
383 47 Christoph Kappel
| <code class="ruby">padding_bottom 2</code>          | Set space for bottom side                                           |
384 47 Christoph Kappel
| <code class="ruby">padding_left   2</code>          | Set space for left side                                             |
385 47 Christoph Kappel
386 47 Christoph Kappel
*Applicable to*: [[Styles#All|All]], [[Styles#Title|Title]], [[Styles#Focus|Focus]], [[Styles#Urgent|Urgent]], [[Styles#Occupied|Occupied]], [[Styles#Views|Views]], [[Styles#Sublets|Sublets]], [[Styles#Separator|Separator]], [[Styles#Visible|Visible]], [[Styles#Subtle|Subtle]]
387 47 Christoph Kappel
388 47 Christoph Kappel
389 47 Christoph Kappel
390 47 Christoph Kappel
Example:
391 47 Christoph Kappel
392 47 Christoph Kappel
<pre><code class="ruby">
393 47 Christoph Kappel
style :title do
394 47 Christoph Kappel
  padding 2
395 47 Christoph Kappel
end
396 47 Christoph Kappel
397 47 Christoph Kappel
style :title do
398 47 Christoph Kappel
  padding 2, 2
399 47 Christoph Kappel
end
400 47 Christoph Kappel
401 47 Christoph Kappel
style :title do
402 47 Christoph Kappel
  padding_top 2
403 47 Christoph Kappel
end</code></pre>
404 47 Christoph Kappel
405 47 Christoph Kappel
h3. Active
406 47 Christoph Kappel
407 47 Christoph Kappel
This property sets the border color and size of the current active client.
408 47 Christoph Kappel
409 47 Christoph Kappel
*Applicable to*: [[Styles#Clients|Clients]]
410 47 Christoph Kappel
411 47 Christoph Kappel
Example:
412 47 Christoph Kappel
413 47 Christoph Kappel
<pre><code class="ruby">style :clients do
414 47 Christoph Kappel
  active "#303030", 2
415 47 Christoph Kappel
end</code></pre>
416 47 Christoph Kappel
417 47 Christoph Kappel
{{needs(r2979)}}
418 47 Christoph Kappel
419 47 Christoph Kappel
h3. Icon
420 47 Christoph Kappel
421 47 Christoph Kappel
This property sets the color of any icons in this panel item.
422 47 Christoph Kappel
423 47 Christoph Kappel
*Applicable to*: [[Styles#All|All]], [[Styles#Focus|Focus]], [[Styles#Urgent|Urgent]], [[Styles#Occupied|Occupied]], [[Styles#Views|Views]], [[Styles#Sublets|Sublets]], [[Styles#Visible|Visible]]
424 47 Christoph Kappel
425 47 Christoph Kappel
426 47 Christoph Kappel
Example:
427 47 Christoph Kappel
428 47 Christoph Kappel
<pre><code class="ruby">style :views do
429 47 Christoph Kappel
  icon "#303030"
430 47 Christoph Kappel
end</code></pre>
431 47 Christoph Kappel
432 47 Christoph Kappel
h3. Inactive
433 47 Christoph Kappel
434 47 Christoph Kappel
This property sets the border color and size of all other clients.
435 47 Christoph Kappel
436 47 Christoph Kappel
{{info(The border size of inactive clients is ignored, because different sizes would require many size and position changes everytime the focus moves.)}}
437 47 Christoph Kappel
438 47 Christoph Kappel
*Applicable to*: [[Styles#Clients|Clients]]
439 47 Christoph Kappel
440 47 Christoph Kappel
Example:
441 47 Christoph Kappel
442 47 Christoph Kappel
<pre><code class="ruby">style :clients do
443 47 Christoph Kappel
  inactive "#202020", 2
444 47 Christoph Kappel
end</code></pre>
445 47 Christoph Kappel
446 47 Christoph Kappel
h3. Panel
447 47 Christoph Kappel
448 47 Christoph Kappel
This property sets the panel color. Following notations are supported:
449 47 Christoph Kappel
450 47 Christoph Kappel
| <code class="ruby">panel        "#000000"</code> | Set color of both panels  |
451 47 Christoph Kappel
| <code class="ruby">panel_top    "#000000"</code> | Set color of top panel    |
452 47 Christoph Kappel
| <code class="ruby">panel_bottom "#000000"</code> | Set color of bottom panel |
453 47 Christoph Kappel
454 47 Christoph Kappel
*Applicable to*: [[Styles#Subtle|Subtle]]
455 47 Christoph Kappel
456 47 Christoph Kappel
Example:
457 47 Christoph Kappel
458 47 Christoph Kappel
<pre><code class="ruby">style :subtle do
459 47 Christoph Kappel
  panel "#202020"
460 47 Christoph Kappel
end
461 47 Christoph Kappel
462 47 Christoph Kappel
style :subtle do
463 47 Christoph Kappel
  panel_top    "#202020"
464 47 Christoph Kappel
  panel_bottom "#202020"
465 47 Christoph Kappel
end</code></pre>
466 47 Christoph Kappel
467 47 Christoph Kappel
{{needs(3097)}}
468 47 Christoph Kappel
469 47 Christoph Kappel
h3. Separator
470 47 Christoph Kappel
471 47 Christoph Kappel
This property sets the separator string.
472 47 Christoph Kappel
473 47 Christoph Kappel
*Applicable to*: [[Styles#Separator|Separator]]
474 47 Christoph Kappel
475 47 Christoph Kappel
Example:
476 47 Christoph Kappel
477 47 Christoph Kappel
<pre><code class="ruby">style :separator do
478 47 Christoph Kappel
  separator "|"
479 47 Christoph Kappel
end</code></pre>
480 47 Christoph Kappel
481 47 Christoph Kappel
h3. Stipple
482 47 Christoph Kappel
483 47 Christoph Kappel
This property sets the color of the panel stippling if any.
484 47 Christoph Kappel
485 47 Christoph Kappel
*Applicable to*: [[Styles#Subtle|Subtle]]
486 47 Christoph Kappel
487 47 Christoph Kappel
Example:
488 47 Christoph Kappel
489 47 Christoph Kappel
<pre><code class="ruby">style :subtle do
490 47 Christoph Kappel
  stipple "#757575"
491 47 Christoph Kappel
end</code></pre>
492 47 Christoph Kappel
493 47 Christoph Kappel
h3. Width
494 47 Christoph Kappel
495 47 Christoph Kappel
This property sets the string length in character, default is 50 characters.
496 47 Christoph Kappel
497 47 Christoph Kappel
*Applicable to*: [[Styles#Clients|Clients]]
498 47 Christoph Kappel
499 47 Christoph Kappel
Example:
500 47 Christoph Kappel
501 47 Christoph Kappel
<pre><code class="ruby">style :clients do
502 47 Christoph Kappel
  width 50
503 47 Christoph Kappel
end</code></pre>
504 47 Christoph Kappel
505 47 Christoph Kappel
h3. Min_width
506 47 Christoph Kappel
507 47 Christoph Kappel
This property sets the min. pixel width of a panel item.
508 47 Christoph Kappel
509 47 Christoph Kappel
*Applicable to*: [[Styles#All|All]], [[Styles#Title|Title]], [[Styles#Focus|Focus]], [[Styles#Urgent|Urgent]], [[Styles#Occupied|Occupied]], [[Styles#Views|Views]], [[Styles#Sublets|Sublets]], [[Styles#Separator|Separator]], [[Styles#Visible|Visible]]
510 47 Christoph Kappel
511 47 Christoph Kappel
Example:
512 47 Christoph Kappel
513 47 Christoph Kappel
<pre><code class="ruby">style :title do
514 47 Christoph Kappel
  min_width 50
515 47 Christoph Kappel
end</code></pre>