Home | Sitemap | Last changes RSS Feed | Wiki help | Wiki tools | SandBox
Preferences | Edit this page | View source | Page history | Referrers
Document last modified: Wed, 28 Feb 2007, 15:56 UTC
Parents: BlackboxDocumentation/ BlackboxStyles/

Blackbox Documentation/Blackbox Styles/Style Syntax

This page documents fully the style syntax used by 0.70+ Blackbox versions.

FIXME: the following is a dump of README.style from the Blackbox 0.70+ package. To do: render the info more nicely, with wiki syntax.

1 data/README.style for Blackbox - an X11 Window manager
1.1 Texture
1.2 Color
1.3 Font
1.4 Alignment
1.5 Width/Height/Margin
1.6 Setting the Background
1.7 Menu Style
1.8 Slit Style
1.9 Toolbar Style
1.10 Window Style

1) data/README.style for Blackbox - an X11 Window manager

1.1) Texture

A texture is a description of a particular visual element. It consists of a text description, colors and a border width. Textures are specified as follows:

<name>.appearancedescription
<name>.backgroundColorbackground color for solids
<name>.color1initial color for gradients and interlaced solids
<name>.color2target color for gradients and interlaced solids
<name>.borderWidthwidth of the texture border in pixels
<name>.borderColorcolor of the texture border

The BNF for the appearance is:

    <appearance> 	:= parentrelative | 
			   [<bevel-type>] [<fill-type>] [interlaced] [border]
    <bevel-type> 	:= sunken | flat | raised
    <fill-type> 	:= gradient <gradient-type> | solid
    <gradient-type> 	:= crossdiagonal | rectangle | pyramid | pipecross |
			   elliptic | horizontal | vertical | diagonal

1.2) Color

A color can be specified as one of the X11 color names (e.g. 'cornsilk3'), as a device-dependent color specification, or as a device-independent color specification.

A device-dependent color specification has the following syntax

    rgb:<red>/<green>/<blue> where <red>, <green>, <blue> := h | hh |
    hhh | hhhh, and h := single hexidecimal digits

    rgbi:<red>/<green>/<blue> where <red>, <green>, and <blue> are
    floating-point values between 0.0 and 1.0, inclusive.

A device-independent color specification has the following syntax:

    CIEXYZ:<X>/<Y>/<Z>
    CIEuvY:<u>/<v>/<Y>
    CIExyY:<x>/<y>/<Y>
    CIELab:<L>/<a>/<b>
    CIELuv:<L>/<u>/<v>
    TekHVC:<H>/<V>/<C> where all values are floating-point values in
    the range 0.0 to 1.0, inclusive.

See the XParseColor? man page for more information on X11 color names.

1.3) Font

A font is a description of the font. Depending on how Blackbox was configured at build time, this can be a FontConfig? font specification (see http://www.fontconfig.org for more information on FontConfig?), or an XLFD font specification.

Note: If a FontConfig? font specification is used, but Blackbox was not built with Xft support, a default XLFD font is used. If an XLFD font specification is used, Blackbox will always use this XLFD, regardless of whether or not Blackbox was built with Xft support.

1.4) Alignment

Alignment is one of the following: Left, Center, Right

1.5) Width/Height/Margin

All width, height and margin resources are specified in pixels. In general, width and height specify the full extent, where as margin specifies the space around another element.

1.6) Setting the Background

You can set the desktop background (i.e. root window) by specifying a command to run in the 'rootCommand' resource. Blackbox includes the 'bsetroot' and 'bsetbg' utilities; their use is recommended. Also, you can override the styles 'rootCommand' by putting your own in your ~/.blackboxrc file. This allows you to always use a custom background, regardless of which style you are using.

Note: Questions about security have been raised about 'rootCommand.' There is an inherent risk when using styles from 3rd parties; use them with caution.

1.7) Menu Style

menu.title			- title texture
Menu.Title
 	.backgroundColor
	.color1
	.color2
	.borderWidth
	.borderColor

menu.title.foregroundColor	- bitmap color for e.g. close button
Menu.Title.ForegroundColor

menu.title.textColor		- title text color 
Menu.Title.TextColor

menu.title.font			- title text font
Menu.Title.Font

menu.title.alignment		- title text alignment
Menu.Title.Alignment

menu.title.marginWidth		- space around text in title
Menu.Title.MarginWidth

menu.frame			- frame texture
Menu.Frame
 	.backgroundColor
	.color1
	.color2
	.borderWidth
	.borderColor

menu.frame.foregroundColor	- bitmap color for checks and submenu-arrows
menu.frame.ForegroundColor

menu.frame.textColor
Menu.Frame.TextColor

menu.frame.disabledColor	- disabled text color
Menu.Frame.DisabledColor

menu.frame.font			- item text font
Menu.Frame.Font

menu.frame.alignment		- text alignment for all items
Menu.Frame.Alignment

menu.frame.marginWidth		- space around all items in frame
Menu.Frame.MarginWidth

menu.active			- texture for the active menu item
Menu.Active
 	.backgroundColor
	.color1
	.color2
	.borderWidth
	.borderColor

menu.active.foregroundColor	- bitmap color for checks and submenu-arrows
Menu.Active.ForegroundColor

menu.active.textColor		- menu item text color 
Menu.Active.TextColor

1.8) Slit Style

slit				- the texture of the slit
Slit
 	.backgroundColor
	.color1
	.color2
	.borderWidth
	.borderColor

slit.marginWidth		- space around and between slit clients
Slit.MarginWidth

1.9) Toolbar Style

toolbar				- the texture of the toolbar itself
Toolbar
 	.backgroundColor
	.color1
	.color2
	.borderWidth
	.borderColor

toolbar.label			- workspace label texture
Toolbar.Label
 	.backgroundColor
	.color1
	.color2
	.borderWidth
	.borderColor

toolbar.windowLabel		- window label texture
Toolbar.WindowLabel
 	.backgroundColor
	.color1
	.color2
	.borderWidth
	.borderColor

toolbar.clock			- clock label texture
Toolbar.Clock
 	.backgroundColor
	.color1
	.color2
	.borderWidth
	.borderColor

toolbar.button			- button texture
Toolbar.Button
 	.backgroundColor
	.color1
	.color2
	.borderWidth
	.borderColor

toolbar.button.pressed		- pressed button texture
Toolbar.Button.Pressed
 	.backgroundColor
	.color1
	.color2
	.borderWidth
	.borderColor

toolbar.label.textColor		- workspace label text color
Toolbar.Label.TextColor

toolbar.windowLabel.textColor	- window label text color
Toolbar.WindowLabel.TextColor

toolbar.clock.textColor	        - clock label text color
Toolbar.Clock.TextColor

toolbar.button.foregroundColor	- bitmap color for buttons
Toolbar.Button.ForegroundColor

toolbar.alignment		- text alignment for all labels
Toolbar.Alignment

toolbar.font			- text font
Toolbar.Font

toolbar.marginWidth		- space around and between buttons and labels
Toolbar.MarginWidth

toolbar.label.marginWidth	- space around text in labels
Toolbar.Label.MarginWidth

toolbar.button.marginWidth	- space around bitmaps in buttons
Toolbar.Button.MarginWidth

1.10) Window Style

window.title.focus		- focused title texture
Window.Title.Focus
 	.backgroundColor
	.color1
	.color2
	.borderWidth
	.borderColor

window.label.focus		- focused label texture
Window.Label.focus
 	.backgroundColor
	.color1
	.color2
	.borderWidth
	.borderColor

window.button.focus		- focused button texture
Window.Button.Focus
 	.backgroundColor
	.color1
	.color2
	.borderWidth
	.borderColor

window.handle.focus		- focus handle texture
Window.Handle.Focus
 	.backgroundColor
	.color1
	.color2
	.borderWidth
	.borderColor

window.grip.focus		- focus grip texture
Window.Grip.Focus
 	.backgroundColor
	.color1
	.color2
	.borderWidth
	.borderColor

window.title.unfocus		- unfocused title texture
Window.Title.Unfocus
 	.backgroundColor
	.color1
	.color2
	.borderWidth
	.borderColor

window.label.unfocus		- unfocused label texture
Window.Label.Unfocus
 	.backgroundColor
	.color1
	.color2
	.borderWidth
	.borderColor

window.button.unfocus		- unfocused button texture
Window.Button.Unfocus
 	.backgroundColor
	.color1
	.color2
	.borderWidth
	.borderColor

window.handle.unfocus		- unfocused handle texture
Window.Handle.Unfocus
 	.backgroundColor
	.color1
	.color2
	.borderWidth
	.borderColor

window.grip.unfocus		- unfocused grip texture
Window.Grip.Unfocus
 	.backgroundColor
	.color1
	.color2
	.borderWidth
	.borderColor

window.button.pressed		- pressed button texture
Window.Button.Pressed
 	.backgroundColor
	.color1
	.color2
	.borderWidth
	.borderColor

window.frame.focus.borderColor	- color of border around focused window
Window.Frame.Focus.BorderColor

window.frame.unfocus.borderColor - color of border around unfocused window
Window.Frame.UnFocus.BorderColor

window.button.focus.foregroundColor - bitmap color for focused buttons
Window.Button.Focus.ForegroundColor

window.button.unfocus.foregroundColor - bitmap color for unfocused buttons
Window.Button.Unfocus.ForegroundColor

window.label.focus.textColor	- text color for focused labels
Window.Label.Focus.TextColor

window.label.unfocus.textColor	- text color for unfocused labels
Window.Label.Unfocus.TextColor

window.font			- text font
Window.Font

window.alignment		- alignment of text in labels
Window.Alignment

window.title.marginWidth	- space around and between buttons and labels
Window.Title.MarginWidth

window.label.marginWidth	- space around text in labels
Window.Label.MarginWidth

window.button.marginWidth	- space around bitmaps in buttons
Window.Button.MarginWidth

window.frame.borderWidth	- border width around client window
Window.Frame.BorderWidth

window.handleHeight		- height of the window handle
Window.HandleHeight

eXTReMe Tracker Hosted by SourceForge.net
Document last modified: Wed, 28 Feb 2007, 15:56 UTC
Home | Sitemap | Last changes RSS Feed | Wiki help | Wiki tools | SandBox
Preferences | Edit this page | View source | Page history | Referrers
Hosted by SourceForge. Powered by Wikki Tikki Tavi. About the website. Terms of use.