< Previous (Actions) - (FAQ) Next >
This section aims to documenting the pekwm theme structure providing enough information to create and modify themes.
Please use the offical pekwm themes as real life examples and base when it comes to making your own theme. The pekwm_theme utility supports a new command which creates an empty theme structure.
Themes can be registered in the pekwm theme index to make them available for use with the pekwm_theme utility.
See the pekwm theme index for details on how to get your theme included.
Themes are contained in a directories with at least a file named theme.
The recomended theme structure, as generated by pekwm_theme new is as follows:
my-theme/ <- directory in which pekwm will look for theme images
backgrounds/ <- directory in which pekwm_bg will look for images
dark.png
light.png
button-close.png
theme <- standard theme variant
theme-dark <- dark theme variant
template <- template file included by both theme variants
Here is the explanation of Attributes names of themes
Attribute | Description | Example |
---|---|---|
pixels | An integer, amount of pixels. | example: "2" |
size | Pixels vertically times pixels horizontally. | example: "2x2" |
percent | Any percent value from 1 to 100. | example: "87" |
toggle | Sets a value as true (1) or false (0). | example: "true" |
padding | Free pixels from top, free pixels under, free pixels from left, free pixels from right. | example: "2 2 2 2" |
decorname | Name for decoration | example: "Default" |
colour | A colour value in RGB format. | example: "#FFFFFF" |
imagename | Name of the imagefile with an option after the # | example: "image.png" |
texture | Any valid texture | example: "Solid #ffffff 4x4 |
fontstring | Defines a font. Chopped to parts by # marks. First the font type (XFT or X11), then the font name, then the text orientation, then shadow offsets. Some fields can be omitted. | example: "XFT#Verdana:size=10#Left#1 1" |
buttonactions | Buttonactions work alike what you are used from the mouse config, first mouse button number pressed when this action should happen, then any standard pekwm actions. | example: "1" { Actions = "Close" } |
Any name can be used and applied to windows with autoproperties or the set decor action. The list below includes names with special meaning:
- DEFAULT, Defines decorations to all windows unless overridden with another decoration set (REQUIRED).
- ATTENTION, Defines the decoration for windows that set the urgency/demand-attention hint.
- BORDERLESS, Defines decorations for borderless windows (recommended).
- INPUTDIALOG, Defines decorations for input dialogs, such as the CmdDialog.
- MENU, Defines decorations for menus.
- STATUSWINDOW, Defines decorations for the command dialog.
- TITLEBARLESS, Defines decorations for titlebarless windows (recommended, should be there if your theme looks nasty when toggled titlebarless).
- WORKSPACEINDICATOR, Defines decorations for the workspace indicator.
- #fixed, Image is fixed size.
- #scaled, Image will be scaled to fit the area it's defined for.
- #tiled, Image will be repeated as many times as needed to fill the area it's defined for. This is the default if no option is specified.
- EMPTY, No texture (transparent).
- SOLID colour size, A solid colour texture of defined colour and size.
- SOLIDRAISED colour colour colour pixels pixels toggle toggle toggle toggle size, A solid colour texture with a 3D look of defined colours, form and size. First colour defines the main fill colour, second the highlight colour used on the left and top parts of the texture, third the highlight colour on the bottom and right parts of the texture. First pixel amount defines how fart apart the 3D effects are from each other, second pixel amount is how thick the bordering will be (both pixels default to 1). The four toggles are used to tell which raised corners are to be drawn. This is useful for example when defining solidraised frame corner pieces. The order is Top, Bottom, Left, Right (not unlike that used in padding). As example: "True False True False" (or 1 0 1 0) could mean you want to draw the TopLeft piece of a solidraised window border. Size should explain itself, see above.
- LINESHORZ size color1 [color2...], Fill the area with horizontal "lines" of size. Size can be specified in pixels or percent of the area being filled with the texture.
- LINESVERT_size color1 [color2...], Fill the area with vertical "lines" of size. Size can be specified in pixels or percent of the area being filled with the texture.
- IMAGE imagename, An image texture using the defined imagename
Theme support for the root background. This option may not be honoured by pekwm if ThemeBackground is set to false in the Screen section of the configuration file.
- Texture (texture), Texture used to set the background. Each head is treated individually for scaled backgrounds.
A list of blocks with theme specifications the various types of decorations.
Theming of the frame.
- Height (pixels), Amount of pixels the titlebar should height.
- HeightAdapt (boolean), If true, Height is adapted to fit the Title font.
- Pad (pixels t,l,r,b), How many pixels are left around a title text.
- Focused (texture), Background texture for a focused titlebar.
- UnFocused (texture), Background texture for an unfocused titlebar.
- WidthMin (pixels), Minimum width of title in pixels, will also place the titlebar outside of the window borders. Use 0 to place titlebar inside borders.
- WidthMax (percent), Maximum width of titles relative to window width, when this value ends up being smaller than the value in WidthMin, WidthMin is overridden.
- WidthSymetric (boolean), Set true to constant width titles or false to use titles that only are as big as the clients title text string requires (note, asymmetric width is not fully implemented yet, always set this true for now to avoid problems).
Theming of a titlebar tabs.
- Focused (texture), Background texture for a tab of a focused window.
- Unfocused (texture), Background texture for a tab of an unfocused window.
- FocusedSelected (texture), Background texture for the currently selected tab of a focused window.
- UnFocusedSelected (texture), Background texture for the currently selected tab of an unfocused window.
Theming of font colors.
- Focused (colour colour), Text colour for a tab of a focused window. second value is the shadow colour.
- Unfocused (colour colour), Text colour for a tab of an unfocused window. second value for shadow.
- FocusedSelected (colour colour), Text colour for the currently selected tab of a focused window. second value for shadow.
- UnFocusedSelected (colour colour), Text colour for the currently selected tab of an unfocused window. second value for shadow.
Theming of the titlebar fonts.
- Focused (fontstring), Font of the text of a tab of a focused window.
- Unfocused (fontstring), Font of the text of a tab of an unfocused window.
- FocusedSelected (fontstring), Font of the text of the currently selected tab of a focused window.
- UnFocusedSelected (fontstring), Font of the text of the currently selected tab of an unfocused window.
Theming of the tab separator.
- Focused (texture), Separator texture for a focused window.
- Unfocused (texture), Separator texture for an unfocused window.
Theming of titlebar buttons.
Right = "Name"
Places the button on the right end of the titlebar.
Left = "Name"
Places the button on the left end of the titlebar.
- Focused (texture), Texture for button of a focused window.
- Unfocused (texture), Texture for button of an unfocused window.
- Pressed (texture), Texture for button that is pressed.
- Hover (texture), Texture for button when pointer is placed on it.
- SetShape (bool), If true, the shape of the button is derived from the alpha-channel. If false, the alpha-channel sets only the transparency. (defaults to true)
- _Button (buttonactions)), Configures what to do when a button is pressed.
Theming of the borders.
Focused: borders for focused windows.
UnFocused: borders for unfocused windows.
- TopLeft (texture), Texture for the top left corner.
- Top (texture), Texture for the top border.
- TopRight (texture), Texture for the top right corner.
- Left (texture), Texture for the left border.
- Right (texture), Texture for the right birder.
- BottomLeft (texture), Texture for the bottom left corner.
- Bottom (texture), Texture for the bottom border.
- BottomRight (texture), Texture for the bottom right border.
Enables theming of the harbour.
- Texture (texture), Texture to use as the harbour background.
Themes the insides of a menu window.
- Pad (padding), How many pixels of space around an entry is reserved.
One of Focused, Unfocused and Selected defining the appearance when the menu/submenu is focused, not focused and the menu entry currently selected.
- Font (fontstring), What font to use.
- Background (texture), A texture that starts from the top of the menu and ends on the bottom.
- Item (texture), A texture that starts from the top of a menu entry and ends on the bottom of the entry.
- Text (colour), Colour of text to use.
- Separator (texture), Texture to use as separator (required, client menu will break if none is defined).
- Arrow (texture), Texture to use for indicating submenus (you want this to be defined too).
Themes the insides of a command dialog window.
- Font (fontstring), What font to use.
- Texture (texture), Texture to use as the background.
- Text (colour), Colour of text.
- Pad (padding), Amount of pixels of space around font to reserve.
Controls the appearance of the pekwm_dialog utility, used by the pekwm_theme command and the crash dialog.
---------------------------------
| Title (TitleFont, TitleColor) |
| |
| (Background) |
| |
| Message (Font, Text) |
| |
| [Option] (Button) |
---------------------------------
- Background (texture), window background color.
- TitleFont (fontstring), font used for the title.
- TitleColor (colour), color of the title text.
- Font (fontstring), font used for the message.
- Text (colour), color of the message text.
- Pad (padding), padding used for all elements.
-
Font (fontstring), font used for button text.
-
Text (colour), color of button text.
-
Focused (texture), focused button texture.
-
Unfocused (texture), unfocused button texture (currently not used).
-
Hoover (texture), button hoover texture.
-
Pressed (texture), button pressed texture.
Themes the insides of the status window that shows up when moving windows and so on.
- Font (fontstring), What font to use.
- Texture (texture), Texture to use as the background.
- Text (colour), Colour of text.
- Pad (padding), Amount of pixels of space around font to reserve.
Themes the workspace indicator that shows up when switching workspace.
- Font (fontstring), What font to use.
- Background (texture), Background for the whole window.
- Workspace (texture), Texture to use when rendering a workspace.
- WorkspaceActive (texture), Texture to use when rendering the active workspace.
- Text (colour) Colour of text.
- EdgePadding (padding), Amount of pixels of space around window edges and workspaces.
- WorkspacePadding (padding), Amount of pixels of space between workspaces.