MyStyle(7x)
π NAME π
MyStyle β bestie, this is the one that defines a whole combination of color, font, style and background that all get used together. It's giving "one glam look, applied everywhere." π
This is a page from the AfterStep X11 window manager manual, section 7x. Periodt.
β¨ CONFIGURATION OPTIONS β¨
Okay so here's every knob you can turn. No skipping, we're doing all of them. π
BackColorcolor β sets the background color that this style is associated with. color is a color definition in one of the color formats that AfterStep supports.
Not me pointing out that BackColor has a secret second job: it's also used to calculate the bevel colors that draw the border around a widget. Iconic multitasking behavior honestly.
BackGradienttype from to β says "actually, use a gradient as the background instead of a plain flat color." The gradient colors start at from and end at to. Both from and to are color definitions in one of the supported color formats. If the gradient includes at least one transparent color (alpha value set to be belowFF), the gradient gets alpha-blended over the root background image. Gorgeous. π¦
The page says type can be 1, 2, 3, 4, or 5 β and then hands you nine of them, so here is literally all of it, bestie:
- Wharf-style diagonal gradient
- Horizontal from top to bottom
- Horizontal from top/bottom to center
- Vertical from left to right
- Vertical from left/right to center
- Top-Left to Bottom Right diagonal ( same as
1) - Bottom-Left to Top-Right diagonal
- Vertical Top to Bottom ( same as
2) - Horizontal Left to Right ( same as
4)
BackMultiGradienttype offset1 color1 ... offsetN colorN β again with the gradient-as-background instead of a solid color, but this time it's a whole multi-stop situation. The gradient colors start atcolor1and end atcolorN. Each color has an offset attached to it β that's a number between0.0and1.0and it says where in the gradient that color gets placed. The colors are in one of the color formats supported by AfterStep. At least two colors must be given. If the gradient includes at least one transparent color (alpha value set to be belowFF), it gets alpha-blended over the root background image. The offsets are non-decreasing numbers between0.0and1.0. If the first offset is not0.0, it will be set to0.0. If the last offset is not1.0, it will be set to1.0.
For type, you've got these options:
- Top-Left to Bottom Right diagonal
- Bottom-Left to Top-Right diagonal
- Vertical Top to Bottom
- Horizontal Left to Right
(those are the types numbered 6, 7, 8 and 9, just so we're clear π)
BackPixmaptype pixmap_name|color_name β use a pixmap as the background instead of a solid color. This one has two forms, depending on what type is:- If type is
125,126,127,128,130-144,150-164β the second parameter, pixmap_name, has to be the name of an image file that can be found inPixmapPath. - If type is
129or149β the root pixmap (your desktop background, the one behind everything) will be used, and the optional second parameter must be a color that the root pixmap will be shaded/tinted with.
- If type is
Depending on the value of type, AfterStep will render the pixmap in many different ways:
125β image is SCALED to the size of the widget, and its opacity is used to set the shape of the widget/window decoration, achieving a non-rectangular window effect.126β image is TILED to the size of the widget, and its opacity is used to set the shape of the widget/window decoration, achieving a non-rectangular window effect.127β image is SCALED to the size of the widget.128β image is Tiled to the size of the image.129β the underlying desktop background is tinted/shaded with the color specified with the second parameter.130β the underlying desktop background is combined with the tiled image, using the"allanon"method β taking the average of pixel values.131β the underlying desktop background is alpha-blended with the tiled image.132β the underlying desktop background is tinted using pixel values of the tiled image, as tint values on a per-pixel basis.133β each pixel of the underlying desktop background has the value of the tiled image's pixel added to it.134β each pixel of the underlying desktop background has the value of the tiled image's pixel subtracted from it.135β the result consists of pixels representing the absolute value of the difference between the underlying desktop background and the tiled image.136β the underlying desktop background is darkened using the luminosity of the tiled image's pixels.137β the underlying desktop background is lightened using the luminosity of the tiled image's pixels.138β the underlying desktop background is"screened"by the tiled image.139β the underlying desktop background is"overlayed"by the tiled image.140β the underlying desktop background's hue is substituted with the hue of the tiled image.141β the underlying desktop background's saturation is substituted with the saturation of the tiled image.142β the underlying desktop background's value (in HSV colorspace) is substituted with the value of the tiled image.143β the underlying desktop background is"colorized"by the tiled image.144β the underlying desktop background is"dissipated"by the tiled image.149β the underlying desktop background is tinted/shaded with the color specified with the second parameter. It differs from129in that the desktop background could be both darkened and brightened. If the tint color channel is greater than7F(127decimal) β then the respective channel of the background will be brightened.150-164β same as130-144, but the specified image is scaled to the size of the widget.
BlurSizeβFIXME: add proper description here.π yeah. That's genuinely what it says. I'm not gonna make something up bestie, I would never lie to you.DrawTextBackground[ 0|1 ]β says the area behind text drawn in this style should be cleared toBackColor. The argument is optional! If the argument is0, the option is turned off; if it's omitted or is nonzero, the option is turned on.Fontfont β sets the font that this style is associated with. font could be either a standard X11 font definition, or a filename of a TrueType font that could be found inFontPath. To specify the size of the TrueType font, use a format like this:FontName.ttf-Size.
Example:
Font DefaultSans.ttf-14
ForeColorcolor β sets the text color associated with this style. color is a color definition in one of the color formats supported by AfterStep.Inherit" style_name "β picks a MyStyle to inherit options from. Options from style_name will override previously specified options for this style. This is a genuinely good move β a great way to save memory and network bandwidth if the sameBackPixmapis used for several styles, since the pixmap will only be loaded for the inherited style. Recycling but make it chic β»οΈMyStyle" style_name "β with its little option body, plus the closing~MyStyle, marks the beginning of a look style definition. You can refer to the style later bystyle_name.~MyStyleends a look style definition.
MyStyle " style_name "
style_option
~MyStyle
OverlayβFIXME: add proper description here.π again!! Nothing more. Moving on before I cry.SliceXEndval β when used with a scalableBackPixmap, it makes the image sliced instead of scaled. Which means its borders stay unchanged, but the center part gets tiled to fill the empty space.SliceXEndis the left edge of the right border.SliceXStartval β same slicing deal with a scalableBackPixmap: borders unchanged, center tiled to fill empty space.SliceXStartis the width of the left border.SliceYEndval β same slicing situation again.SliceYEndis the top edge of the bottom border.SliceYStartval β same slicing energy.SliceYStartis the height of the top border.TextStylestyle β sets the text style for this style. (The page says style can be0,1, or2and then gives you ten, soβ¦ here's all ten, queen. π)- normal text
- embossed 3D text
- sunken 3D text
- text has shade above the text
- text has shade below the text
- thick embossed 3D text
- thick sunken 3D text
- text is outlined with contrasting color on the upper edge of a glyph.
- text is outlined with contrasting color on the bottom edge of a glyph.
- text is outlined with contrasting color all around a glyph.
πΈ DESCRIPTION πΈ
So. MyStyle's are the way you define how widgets (menu items, titlebars, wharf buttons, Pager desktops, etc.) should be rendered. It defines the widget's background (solid color, gradient, textured image and/or semitransparent texture), its shape β making the widget non-rectangular, bestie β the text font, the text 3D style, and the widget's border bevel colors. That's a lot of jobs for one concept and it does all of them. Main character energy. π
Every GUI element is rendered using a consistent approach in every module and every part of AfterStep. The interface is built from so-called TBars. A TBar is a rectangular area that may be focused (hilited) or unfocused, and pressed or unpressed.
π«Ά TBAR STRUCTURE π«Ά
Each TBar has the following structure:
- the background of the TBar, which is defined by MyStyle and the state of the bar β there are two MyStyles assigned to each TBar: one for the focused state and one for the unfocused state.
- tiles of the TBar. Tiles are smaller features that get arranged inside the bar according to its size, alignment, position and order. Tiles could be:
- static icons (cannot be pressed);
- blocks of buttons β each having two shapes, pressed and normal;
- Text labels;
- Empty space tiles.
There can be up to 256 tiles, each residing on one of the cells in an 8x8 grid. Several tiles could reside in a single cell, in which case they get superimposed on top of each other. Stacked, layered, cute. β¨
- bevel of the TBar. When a TBar is rendered, all of its tiles are superimposed on top of its background, and the resulting image will have a 3D bevel drawn on it, using colors from the same MyStyle as used for the background. The bevel could be switched off partially or entirely. Respective configuration options have been added where appropriate. When a TBar is pressed β its bevel is inverted. π₯
π TBAR RENDERING π
When a TBar is rendered, all of its elements get superimposed on top of each other using one of 13 blending methods supported by libAfterImage, with the default being simple alphablending. See the MyFrame configuration for more details. This is referred to as the "Composition Method".
That's the whole page, bestie. Every option, every type, every pixel-flavored detail. You're so welcome. π«Ά
Anywaaay, this lil masterpiece comes to you from the 3rd Berkeley Distribution, tagged AfterStep v.2.2.12 β and it's the MyStyle(7x) page itself, so you know exactly where you are. Study it, slay it, go make some non-rectangular windows. πβ¨ππ¦
π¦ where this page comes from
- ubuntu resolute: afterstep-data 2.2.12-19 Β· GPL-2.0-or-later
- ubuntu stonking: afterstep-data 2.2.12-19 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms