File: labwc-theme.5.scd

package info (click to toggle)
labwc 0.9.1-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,856 kB
  • sloc: ansic: 32,546; perl: 5,834; xml: 886; sh: 162; python: 131; makefile: 12
file content (505 lines) | stat: -rw-r--r-- 16,781 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
labwc-theme(5)

# NAME

labwc - theme files

# THEME

The theme engine aims to be compatible with openbox and themes will be
searched for in the following order:

- ${XDG_DATA_HOME:-$HOME/.local/share}/themes/<theme-name>/labwc/
- $HOME/.themes/<theme-name>/labwc/
- /usr/share/themes/<theme-name>/labwc/
- /usr/local/share/themes/<theme-name>/labwc/
- /opt/share/themes/<theme-name>/labwc/
- ${XDG_DATA_HOME:-$HOME/.local/share}/themes/<theme-name>/openbox-3/
- $HOME/.themes/<theme-name>/openbox-3/
- /usr/share/themes/<theme-name>/openbox-3/
- /usr/local/share/themes/<theme-name>/openbox-3/
- /opt/share/themes/<theme-name>/openbox-3/

When $XDG_DATA_HOME is defined, it replaces (rather than augments)
$HOME/.local/share. The same is the case for $XDG_DATA_DIRS and /usr/share/.

Choosing a theme is done by editing the <name> key in the <theme> section of
the rc.xml configuration file (labwc-config(5)).

A theme consists of a themerc file and optionally some titlebar icons (referred
to as buttons).

Theme settings specified in themerc can be overridden by creating a
'themerc-override' file in the configuration directory, which is normally
$HOME/.config/labwc/ but can be a few other locations as described in
labwc-config(5).

# DATA TYPES

*color*
	Colors can be specified by name or hexadecimal Red-Green-Blue (RGB)
	value:

	*color name* refers to "X11 color name", for example: 'white', 'grey40',
	'pink' and 'peach puff'. More information can be found here:
	- http://en.wikipedia.org/wiki/Web_colors#X11_color_names
	- http://en.wikipedia.org/wiki/X11_color_names
	- https://github.com/labwc/labwc/blob/master/src/common/rgb.txt

	*RGB value*

	- #rrggbb (hexadecimal RGB values)
	- #rrggbb aaa (same but with decimal alpha value percentage)
	- #rrggbbaa (same but with inline alpha value in hex encoding)
	- #rgb (hexadecimal RGB values where #fff is shorthand for #f0f0f0)
	  (since 0.9.0)

	Note: the #rrggbb aaa notation is deprecated starting from
	labwc 0.7.2 and may be removed in future releases.

*justification*
	Justification determines the horizontal alignment of text.
	Valid options are Left, Center and Right.

*textures*
	Textures determine the visual look of an element. They are specified
	through a text string with a number of fields. Capitalization is not
	significant. The format is as follows:

```
(Solid | Gradient <type>)
```

	... where *|* stands for "or".

	- *Solid* means that the background of the texture is filled with a
	  single color. The texture must be accompanied by a single color field.
	  For example:

```
window.*.title.bg: Solid
window.*.title.bg.color: #f8f5f2
```

	- *Gradient* means that the background of the texture is filled with a
	  gradient from one color to another. When Gradient is specified, it
	  must be followed by the gradient's type. It must also be accompanied
	  by the fields *color* and *colorTo*. Valid gradient types are:
	  (1) *Vertical* where the gradient goes from the top edge to the bottom
	  (2) *SplitVertical* where the gradient is split in the middle and goes
	  out toward the top and bottom edges. SplitVertical gradients have two
	  extra, optional color fields: *color.splitTo* and *colorTo.splitTo*.
	  These colors are the light colors used on the far top and bottom of
	  the SplitVertical gradient. When these are omitted, the default values
	  for these are *color x 5/4* and *colorTo x 17/16*. Examples:

```
# Vertical gradient
window.*.title.bg: Gradient Vertical
window.*.title.bg.color: #658fb5
window.*.title.bg.colorTo: #4d6982

# SplitVertical gradient
window.*.title.bg: Gradient SplitVertical
window.*.title.bg.color: #658fb5
window.*.title.bg.color.splitTo: #7595b9
window.*.title.bg.colorTo: #4d6982
window.*.title.bg.colorTo.splitTo: #557485
```

# THEME ELEMENTS

*border.width*
	Line width (integer) of border drawn around window frames.
	Default is 1.

*window.titlebar.padding.width*
	Horizontal titlebar padding size, in pixels, between border and first
	button on the left/right.
	Default is 0.

*window.titlebar.padding.height*
	Vertical titlebar padding size, in pixels.
	Default is 0.

*window.active.border.color*
	Border color of active window. Default is #aaaaaa.

*window.inactive.border.color*
	Border color of inactive window. Default is #aaaaaa.

*window.active.indicator.toggled-keybind.color*
	Status indicator for the ToggleKeybinds action. Can be set to the same
	value as set for window.active.border.color to disable the status
	indicator. Default is #ff0000.

*window.active.title.bg*
	Texture for the focused window's titlebar. See texture section above.
	Default is *Solid*

*window.active.title.bg.color*
	Background color for the focused window's titlebar. See texture section
	for additional color fields associated with gradients.
	Default is #e1dedb.

*window.inactive.title.bg*
	Texture for non-focused windows' titlebars. See texture section above.
	Default is *Solid*

*window.inactive.title.bg.color*
	Background color for non-focused windows' titlebars. See texture section
	for additional color fields associated with gradients.
	Default is #f6f5f4.

*window.active.label.text.color*
	Text color for the focused window's titlebar. Default is #000000.

*window.inactive.label.text.color*
	Text color non-focused windows' titlebars. Default is #000000.

*window.label.text.justify*
	Specifies how window titles are aligned in the titlebar for both
	focused and unfocused windows. Type justification. Default is Center.

*window.button.width*
	Width of a titlebar button, in pixels.
	Default is 26.

*window.button.height*
	Height of a titlebar button, in pixels.
	Default is 26.

*window.button.spacing*
	Space between titlebar buttons, in pixels.
	Default is 0.

*window.button.hover.bg.corner-radius*
	Radius of the hover effect of a titlebar button, in pixels.
	Default is 0.

	Note: for a circular hover effect, set *window.button.width* and
	*window.button.height* equal and *window.button.hover.bg.corner-radius*
	half of them.

*window.active.button.unpressed.image.color*
	Color of the images in titlebar buttons in their default, unpressed,
	state. This element is for the focused window. Default is #000000.

*window.inactive.button.unpressed.image.color*
	Color of the images in titlebar buttons in their default, unpressed,
	state. This element is for non-focused windows. Default is #000000.

Note: Button elements (i.e. window.[in]active.button.\*) may be defined uniquely
for each type of button ("menu", "iconify", "max", "shade", "desk" or "close")
by appending the type after the "button" node. For example:

- window.active.button.iconify.unpressed.image.color indicates the color of the
iconify button for active windows; while

- window.inactive.button.close.unpressed.image.color indicates the color of the
close button for inactive windows.

This syntax is not documented by Openbox, but is supported and is used by many
popular themes. For the sake of brevity, these elements are not listed here, but
all are supported.

*window.active.shadow.size*
	Size of the drop-shadow for the focused window, in pixels.
	Default is 60.

*window.inactive.shadow.size*
	Size of drop-shadows for non-focused windows, in pixels.
	Default is 40.

*window.active.shadow.color*
	Color of the drop-shadow for the focused window, including opacity.
	Default is #00000060 (black with 38% opacity).

*window.inactive.shadow.color*
	Color of drop-shadows for non-focused windows, including opacity.
	Default is #00000040 (black with 25% opacity).

*menu.overlap.x*
	Horizontal overlap in pixels between submenus and their parents. A
	positive value move submenus over the top of their parents, whereas a
	negative value creates a gap between submenus and their parents.
	Default is 0.

*menu.overlap.y*
	Vertical offset in pixels between submenus and their parents. Positive
	values for downwards and negative for upwards. Default is 0.

*menu.width.min*
	Minimal width for menus. Default is 20.
	A fixed width can be achieved by setting .min and .max to the same
	value.

*menu.width.max*
	Maximal width for menus. Default is 200.
	A fixed width can be achieved by setting .min and .max to the same
	value.

*menu.border.width*
	Border width of menus in pixels. Inherits *border.width* if not set.

*menu.border.color*
	Border color of menus. Inherits *window.active.border.color* if not set.

*menu.items.padding.x*
	Horizontal padding of menu text entries in pixels.
	Default is 7.

*menu.items.padding.y*
	Vertical padding of menu text entries in pixels.
	Default is 4.

*menu.items.bg.color*
	Background color of inactive menu items. Default is #fcfbfa.

*menu.items.text.color*
	Text color of inactive menu item. Default is #000000.

*menu.items.active.bg.color*
	Background color of active menu items. Default is #e1dedb.

*menu.items.active.text.color*
	Text color of active menu item. Default is #000000.

*menu.separator.width*
	Line thickness of menu separators. Default is 1.

*menu.separator.padding.width*
	Space on the left and right side of each separator line. Default is 6.

*menu.separator.padding.height*
	Space above and below each separator line. Default is 3.

*menu.separator.color*
	Menu separator color. Default is #888888.

*menu.title.bg.color*
	Menu title color. Default is #589bda.
	Note: A menu title is a separator with a label.

*menu.title.text.justify*
	Specifies how menu titles are aligned in the titlebar.
	Type justification. Default is Center.

*menu.title.text.color*
	Text color of separator label. Default is #ffffff.

*osd.bg.color*
	Background color of on-screen-display. Inherits
	*window.active.title.bg.color* if not set.

*osd.border.color*
	Border color of on-screen-display. Inherits *osd.label.text.color* if
	not set.

*osd.border.width*
	Border width of on-screen-display. Inherits *border.width* if not set.

*osd.label.text.color*
	Text color of on-screen-display. Inherits
	*window.active.label.text.color* if not set.

*osd.window-switcher.width*
	Width of window switcher in pixels. Default is 600.
	Width can also be percent of the width of the monitor.
	% is mandatory as last character in this case, max 100%

*osd.window-switcher.padding*
	Padding of window switcher in pixels. This is the space between the
	window-switcher border and its items. Default is 4.

*osd.window-switcher.item.padding.x*
	Horizontal padding of window switcher entries in pixels.
	Default is 10.

*osd.window-switcher.item.padding.y*
	Vertical padding of window switcher entries in pixels.
	Default is 1.

*osd.window-switcher.item.active.border.width*
	Border width of the selection box in the window switcher in pixels.
	Default is 2.

*osd.window-switcher.item.icon.size*
	Size of the icon in window switcher, in pixels.
	If not set, the font size derived from <theme><font place="OnScreenDisplay">
	is used.

*osd.window-switcher.preview.border.width*
	Border width of the outlines shown as the preview of the window selected
	by window switcher. Inherits *osd.border.width* if not set.

*osd.window-switcher.preview.border.color*
	Color(s) of the outlines shown as the preview of the window selected by
	window switcher. Possible value is a color or up to 3 colors separated
	by commas (e.g. "#ffffff,#000000,#ffffff"). When multiple colors are
	specified, a multi-line rectangle with each line having the specified
	color is drawn. If not set, this inherits the on-screen-display theme
	("[*osd.bg.color*],[*osd.label.text.color*],[*osd.bg.color*]").

*osd.workspace-switcher.boxes.width*
	Width of boxes in workspace switcher in pixels. Setting to 0 disables
	boxes. Default is 20.

*osd.workspace-switcher.boxes.height*
	Height of boxes in workspace switcher in pixels. Setting to 0 disables
	boxes. Default is 20.

*osd.workspace-switcher.boxes.border.width*
	Border width of boxes in workspace switcher in pixels. Default is 2.

*snapping.overlay.region.bg.enabled* [yes|no]
	Show a filled rectangle as an overlay when a window is snapped to a
	region. Default is yes for hardware-based renderers and no for
	software-based renderers.

*snapping.overlay.edge.bg.enabled* [yes|no]
	Show a filled rectangle as an overlay when a window is snapped to an
	edge. Default is yes for hardware-based renderer and no for
	software-based renderers.

*snapping.overlay.region.border.enabled* [yes|no]
	Show an outlined rectangle as an overlay when a window is snapped to a
	region. Default is no for hardware-based renderers and yes for
	software-based renderers.

*snapping.overlay.edge.border.enabled* [yes|no]
	Show an outlined rectangle as an overlay when a window is snapped to an
	edge. Default is no for hardware-based renderer and yes for
	software-based renderers.

*snapping.overlay.region.bg.color*
	Color of a filled rectangle shown as an overlay when a window is snapped
	to a region. Default is #8080b380.

*snapping.overlay.edge.bg.color*
	Color of a filled rectangle shown as an overlay when a window is snapped
	to an edge. Default is #8080b380.

*snapping.overlay.region.border.width*
	Border width of an outlined rectangle shown as an overlay when a window
	is snapped to a region. Inherits `osd.border.width` if not set.

*snapping.overlay.edge.border.width*
	Border width of an outlined rectangle shown as an overlay when a window
	is snapped to an edge. Inherits `osd.border.width` if not set.

*snapping.overlay.region.border.color*
	Color(s) of an outlined rectangle shown as an overlay when a window is
	snapped to a region. Possible values and the default value are the same
	as those of *osd.window-switcher.preview.border.color*.

*snapping.overlay.edge.border.color*
	Color(s) of an outlined rectangle shown as an overlay when a window is
	snapped to an edge. Possible values and the default value are the same
	as those of *osd.window-switcher.preview.border.color*.

*border.color*
	Set both *window.active.border.color* and
	*window.inactive.border.color*. This is obsolete, but supported for
	backward compatibility as some themes still contain it.

*magnifier.border.width*
	Width of magnifier window border in pixels. Default is 1.

*magnifier.border.color*
	Color of the magnfier window border. Default is #ff0000 (red).

# BUTTONS

The images used for the titlebar icons are referred to as buttons.

The image formats listed below are supported. They are listed in order of
precedence, where the first format in the list is searched for first.

- png
- svg
- xbm

By default, buttons are 1-bit xbm (X Bitmaps). These are masks where 0=clear and
1=colored. The xbm image files are placed in the same directory as the themerc
file within a particular theme. The following xbm buttons are supported:

- max.xbm
- iconify.xbm
- close.xbm
- menu.xbm
- max_toggled.xbm
- desk.xbm
- desk_toggled.xbm
- shade.xbm
- shade_toggled.xbm

Additional icons can be defined to be shown when the mouse pointer is hovering
over the button in question:

- max_hover.xbm
- iconify_hover.xbm
- close_hover.xbm
- menu_hover.xbm
- max_toggled_hover.xbm
- desk_hover.xbm
- desk_toggle_hover.xbm
- shade_hover.xbm
- shade_toggle_hover.xbm

One advantage of xbm buttons over other formats is that they change color based
on the theme. Other formats use the suffices "-active" and "-inactive" to align
with the respective titlebar colors. For example: "close-active.png"

For compatibility reasons, the following alternative names are supported
for xbm files:

- max_hover_toggled.xbm for max_toggled_hover.xbm

When using png or svg icons, for a full theme experience all of the
following icons should be added:

- close-active.[png|svg]
- close_hover-active.[png|svg]
- close_hover-inactive.[png|svg]
- close-inactive.[png|svg]
- iconify-active.[png|svg]
- iconify_hover-active.[png|svg]
- iconify_hover-inactive.[png|svg]
- iconify-inactive.[png|svg]
- max-active.[png|svg]
- max_hover-active.[png|svg]
- max_hover-inactive.[png|svg]
- max-inactive.[png|svg]
- max_toggled-active.[png|svg]
- max_toggled_hover-active.[png|svg]
- max_toggled_hover-inactive.[png|svg]
- max_toggled-inactive.[png|svg]
- menu-active.[png|svg]
- menu_hover-active.[png|svg]
- menu_hover-inactive.[png|svg]
- menu-inactive.[png|svg]
- shade-active.[png|svg]
- shade_hover-active.[png|svg]
- shade_hover-inactive.[png|svg]
- shade-inactive.[png|svg]
- shade_toggled-active.[png|svg]
- shade_toggled-inactive.[png|svg]
- shade_toggled_hover-active.[png|svg]
- shade_toggled_hover-inactive.[png|svg]
- desk-active.[png|svg]
- desk_hover-active.[png|svg]
- desk_hover-inactive.[png|svg]
- desk-inactive.[png|svg]
- desk_toggled-active.[png|svg]
- desk_toggled-inactive.[png|svg]
- desk_toggled_hover-active.[png|svg]
- desk_toggled_hover-inactive.[png|svg]

# DEFINITIONS

The handle is the window edge decoration at the bottom of the window.

# SEE ALSO

labwc(1), labwc-config(5), labwc-actions(5)