diff options
author | mathias <mathias> | 2006-07-26 06:06:45 (GMT) |
---|---|---|
committer | mathias <mathias> | 2006-07-26 06:06:45 (GMT) |
commit | 24b00ec7ba9dc0f363404e96f7a99b3266d08a50 (patch) | |
tree | 97bed8b7b246529359ad29cae748a331533329c2 /doc/asciidoc/fluxstyle.txt | |
parent | 8757478dbb7c678d75193dfff15cbf2273de612e (diff) | |
download | fluxbox-24b00ec7ba9dc0f363404e96f7a99b3266d08a50.zip fluxbox-24b00ec7ba9dc0f363404e96f7a99b3266d08a50.tar.bz2 |
started to convert fluxstyle to asciidoc
Diffstat (limited to 'doc/asciidoc/fluxstyle.txt')
-rw-r--r-- | doc/asciidoc/fluxstyle.txt | 184 |
1 files changed, 184 insertions, 0 deletions
diff --git a/doc/asciidoc/fluxstyle.txt b/doc/asciidoc/fluxstyle.txt new file mode 100644 index 0000000..e4cf1f7 --- /dev/null +++ b/doc/asciidoc/fluxstyle.txt | |||
@@ -0,0 +1,184 @@ | |||
1 | fluxstyle(1) | ||
2 | ============ | ||
3 | Henrik Kinnunen <fluxgen@fluxbox.org> | ||
4 | v1.0rc2 26th July 2006 | ||
5 | |||
6 | NAME | ||
7 | ---- | ||
8 | fluxstyle - A comprehensive look at styles/themes for fluxbox. | ||
9 | |||
10 | SYNOPSIS | ||
11 | -------- | ||
12 | |||
13 | DESCRIPTION | ||
14 | ----------- | ||
15 | What is a Style? | ||
16 | |||
17 | Styles, sometimes referred to as Themes, are a graphical overlay for the | ||
18 | fluxbox(1) window manager. If you wanted to get to know fluxbox, the styles | ||
19 | would be the 'look' of the 'look and feel'. | ||
20 | |||
21 | Styles are simple ASCII text files that tell Fluxbox how to generate the | ||
22 | appearance of different components of the window manager. The default | ||
23 | installation of fluxbox is shipped with many classic examples that show a | ||
24 | great deal of what one could do. To use one of the standard styles navigate to | ||
25 | the 'System Styles' menu under your main fluxbox menu. | ||
26 | |||
27 | fluxbox uses it's own graphics class to render its images on the fly. By using | ||
28 | styles you can determine, at a great level, of configurability what your | ||
29 | desktop will look like. Since fluxbox was derived from flackbox many often | ||
30 | wonder if old themes will work on the latest releases of flackbox. Well they | ||
31 | basically do, but you will have to tune them since the fluxbox code has | ||
32 | changed quite a bit since the initial grab. | ||
33 | |||
34 | STRUCTURE | ||
35 | --------- | ||
36 | A style is made up of a few major components which then have their own | ||
37 | sub-directives. The major components are as follows: | ||
38 | |||
39 | The 'window.\*' directives control the appearance of the window frames, | ||
40 | window.tab.* controls the appearance of the window tabs, 'menu.\*' controls | ||
41 | the appearance of the popup menu that you see when you right click on the | ||
42 | desktop. 'toolbar.\*' is the bar you will see at the top or bottom of your | ||
43 | screen. Finally the 'slit.\*' has options you can use to customize the | ||
44 | appearance of the slit. However if you don't set the slit directives | ||
45 | specifically, the slit's appearance is controlled by the toolbar | ||
46 | directives instead. | ||
47 | |||
48 | To understand how the style mechanism works, it is nice to know a little about | ||
49 | how X11 resources work. X11 resources consist of a key and a value. The key is | ||
50 | constructed of several smaller keys (sometimes referred to as children), | ||
51 | delimited by a period (.). Keys may also contain an asterisk (\*) | ||
52 | to serve as a wildcard, which means that one line of text will match | ||
53 | several keys. This is useful for styles that are based on one or two | ||
54 | colors. | ||
55 | |||
56 | A more complete reference to this can be found in X(7), section 'RESOURCES'. | ||
57 | |||
58 | LOCATION | ||
59 | -------- | ||
60 | There are many places to store your styles, the most common is in your | ||
61 | '~/.fluxbox/styles' directory. The initial installation will place the default | ||
62 | styles in '/usr/share/fluxbox/styles' providing a basic usable configuration. | ||
63 | |||
64 | When creating your own style, create a directory (normally the name of your | ||
65 | style) in '~/.fluxbox/styles/' (If the 'styles' directory doesn't exist, | ||
66 | create that also). While there isn't an official structure, it is | ||
67 | common to create a directory named after your style and place your | ||
68 | pixmaps directory (if required) in there along with a file called | ||
69 | theme.cfg (may also be named style.cfg). This file is where you will | ||
70 | construct your style using the components covered later in this manual | ||
71 | page. An example of steps taken when beginning a style project of your | ||
72 | own may look like: | ||
73 | |||
74 | $ cd | ||
75 | $ mkdir -p ~/.fluxbox/styles/YourStyle/pixmaps | ||
76 | $ cd ~/.fluxbox/styles/YourStyle | ||
77 | $ nano theme.cfg | ||
78 | |||
79 | Output of a packaged style should look like the following: | ||
80 | |||
81 | $ cd | ||
82 | $ tar -tjvf YourStyle.tar.bz2 | ||
83 | .fluxbox/styles/YourStyle/theme.cfg | ||
84 | .fluxbox/styles/YourStyle/pixmaps | ||
85 | .fluxbox/styles/YourStyle/pixmaps/stick.xpm | ||
86 | ... | ||
87 | |||
88 | Of course, all of these are just preferences, Fluxbox allows for the | ||
89 | customization of many things, including how you handle your styles. Just | ||
90 | remember, however, that if you plan to distribute your style you may find | ||
91 | some community bickering if you don't follow practices. :) | ||
92 | |||
93 | CREATING YOUR STYLE | ||
94 | ------------------- | ||
95 | As discussed above, Fluxbox allows you to configure its four main components: | ||
96 | the toolbar, menus, slit and window decorations. Remember that you can | ||
97 | customize the slit with its own directives, otherwise the slit will take the | ||
98 | appearance of the toolbar. | ||
99 | |||
100 | Here are some quick examples to illustrate basic syntax: | ||
101 | |||
102 | toolbar.clock.color: green | ||
103 | |||
104 | This sets the color resource of the toolbar clock to 'green'. Another example: | ||
105 | |||
106 | menu*color: rgb:3/4/5 | ||
107 | |||
108 | This sets the color resource of the menu and all of its 'children' to | ||
109 | `rgb:3/4/5'. (For a description of color names, see X(1).) So this one also | ||
110 | applies to 'menu.title.color' and 'menu.frame.color'. And with | ||
111 | |||
112 | *font: -b&h-lucida-medium-r-normal-*-*-140-* | ||
113 | |||
114 | you set the font resource for all keys to this font name all at once (For | ||
115 | information about the fonts installed on your system, you can use a | ||
116 | program like xfontsel(1), gtkfontsel, or xlsfonts(1).) | ||
117 | |||
118 | In the last example you will notice the wildcard (\*) before font. In a Fluxbox | ||
119 | style you can set a value with a wild card. The example means that every font | ||
120 | in the style will be what is specified. You can do this with any | ||
121 | component/value. For example if you wanted all of the text to be one color you | ||
122 | would do: | ||
123 | |||
124 | *textColor: rgb:3/4/5 | ||
125 | |||
126 | This means that you can setup a very simple style with very few properties. | ||
127 | See the EXAMPLES below for an example of this in practice. Fluxbox also allows | ||
128 | you to override wildcards in your style. Lets take our example above and add | ||
129 | an override for the toolbar.clock.textColor component: | ||
130 | |||
131 | *textColor: rgb:3/4/5 | ||
132 | toolbar.clock.textColor: rgb:255/0/0 | ||
133 | |||
134 | With that all of the text will be 'rgb:3/4/5' except the toolbar clock text | ||
135 | which will be 'rgb:255/0/0'. | ||
136 | |||
137 | Now what makes fluxbox so spectacular is its ability to render textures on the | ||
138 | fly. A texture is a fillpattern that you see on some styles. Texture | ||
139 | descriptions are specified directly to the key that they should apply to, | ||
140 | e.g.: | ||
141 | |||
142 | toolbar.clock: Raised Gradient Diagonal Bevel1 | ||
143 | toolbar.clock.color: rgb:8/6/4 | ||
144 | toolbar.clock.colorTo: rgb:4/3/2 | ||
145 | |||
146 | Don't worry, we will explain what these mean. A texture description consists | ||
147 | of up to five fields, which are as follows: | ||
148 | |||
149 | .Flat | Raised | Sunken | ||
150 | gives the component either a flat, raised or sunken appearance. | ||
151 | |||
152 | .Gradient | Solid | ||
153 | tells Fluxbox to draw either a solid color or a gradient texture. | ||
154 | |||
155 | .Horizontal | Vertical | Diagonal | Crossdiagonal | Pipecross | Elliptic | Rectangle | Pyramid | ||
156 | Select one of these texture types. They only work when *Gradient* is specified. | ||
157 | |||
158 | .Interlaced | ||
159 | tells fluxbox to interlace the texture (darken every other line). This option | ||
160 | is most commonly used with gradiented textures, but from fluxbox version | ||
161 | 0.60.3 on, it also works in solid textures. | ||
162 | |||
163 | .Bevel1 | Bevel2 | ||
164 | tells fluxbox which type of bevel to use. Bevel1 is the default bevel. The | ||
165 | shading is placed on the edge of the image. Bevel2 is an alternative. The | ||
166 | shading is placed one pixel in from the edge of the image. | ||
167 | |||
168 | Instead of a texture description, also the option *ParentRelative* is available, | ||
169 | which makes the component appear as a part of its parent, e.g. totally | ||
170 | transparent. | ||
171 | |||
172 | Or for even more possibilities Pixmap. If pixmap texture is specified (it | ||
173 | might not be necessary on every occasion) the pixmap file is specified | ||
174 | in a separate pixmap resource. | ||
175 | |||
176 | toolbar.clock: pixmap | ||
177 | toolbar.clock.pixmap: clock_background.xpm | ||
178 | |||
179 | This feature might need some investigation, reports say that sometimes the | ||
180 | resources color and colorTo must be set and then they may not be set. | ||
181 | |||
182 | All gradiented textures are composed of two color values: the 'color' and | ||
183 | 'colorTo' resources. When *Interlaced* is used in *Solid* mode, the 'colorTo' | ||
184 | resource is used to find the interlacing color. | ||