Both sides previous revisionPrevious revisionNext revision | Previous revision |
howto:xfwm4_theme [2020/10/15 03:24] – Add frame_border_top example images emh_mark_i | howto:xfwm4_theme [2024/12/14 02:09] (current) – improved grammar & formatting kevinbowen |
---|
~~NOTOC~~ | ~~NOTOC~~ |
====== Xfwm4 theme how-to ====== | ====== Xfwm4 Window Component and Theming how-to ====== |
| |
| |
| * **[[#Window Components|Window Components & Definitions]]** |
| * **[[#Titlebar decorations|Titlebar decorations]]** |
| * **[[#Window Sidebars and bottom|Window Sidebars and bottom]]** |
| * **[[#Xfwm4 Buttons|Xfwm4 Buttons]]** |
* **[[#Themes locations|Themes locations]]** | * **[[#Themes locations|Themes locations]]** |
* **[[#Titlebar decorations|Titlebar decorations]]** | |
* **[[#Window Sidebars and bottom|Window Sidebars and bottom]]** | |
* **[[#Xfwm4 Buttons|Xfwm4 Buttons]]** | |
* **[[#Themerc file|Themerc file]]** | * **[[#Themerc file|Themerc file]]** |
* **[[#Gtk Color pickup|Gtk Color pickup]]** | * **[[#Gtk Color pickup|Gtk Color pickup]]** |
* **[[#XPM (X PixMap) format|XPM (X PixMap) format]]** | * **[[#XPM (X PixMap) format|XPM (X PixMap) format]]** |
* **[[#Xfwm 4.2 new functionality|Xfwm 4.2 new functionality]]** | * **[[#Xfwm 4.2 new functionality|Xfwm 4.2 new functionality]]** |
| * **[[#List of frame and button part names|List of frame and button part names]]** |
| * **[[#Xfwm 4.20 new functionality|Xfwm 4.20 new functionality]]** |
* **[[#Conclusion|Conclusion]]** | * **[[#Conclusion|Conclusion]]** |
* **[[#List of frame and button part names|List of frame and button part names]]** | |
| |
---- | ---- |
| |
===== Introduction ===== | ===== Introduction ===== |
Xfwm4, Xfce4's native window manager uses a simple yet flexible pixmap based theme engine using images in .xpm format. Xfwm4 also uses a text file for other configuration options (see themerc section). Further to this you can also make a theme pick up gtk theme colours which will be covered in the gtk color pickup section of the document. | Xfwm4, Xfce's native window manager, uses a simple yet flexible pixmap based theme engine using images in .xpm format. Xfwm4 also uses a text file for other configuration options (see themerc section). Further to this you can also make a theme pick up gtk theme colours which will be covered in the gtk color pickup section of the document. |
| |
{{ howto:xfwm4:xfwm4-window.gif |Figure 1 - A sample window}} | {{ howto:xfwm4:xfwm4-window.gif |Figure 1 - A sample window}} |
| |
===== Themes locations ===== | ---- |
In Xfwm4 version 4.0, the themes are searched in the following directories: | |
| |
* User's home dir /.themes/xfwm4/theme_name (e.g.: ''/home/joe/.themes/xfwm4/b5'') | |
* System's shared data directory /xfwm4/theme_name (e.g.: ''/usr/share/xfwm4/themes/b5'') | |
| |
In Xfwm version 4.2, the theme location is in line with the standard, searched in the following directories: | ====== Window Components ====== |
| |
* User's home dir /.themes/theme_name/xfwm4 (e.g.: "/home/joe/.themes/b5/xfwm4") | ===== Titlebar decorations ===== |
* System's shared data directory /themes/theme_name/xfwm4 controlled by the package manager (e.g.: "/usr/share/themes/b5/xfwm4") | For title bar decorations, xfwm4 uses five pixmaps named ''title-1-active.xpm'' to ''title-5-active.xpm''. For the window corners, the pixmaps used are ''top-left-active.xpm'' and ''top-right-active.xpm'' (see figure 2 below). |
* System's shared data directory /local/themes/theme_name/xfwm4 controlled by the local administrator (e.g.: "/usr/local/share/themes/b5/xfwm4") | |
| |
[[|Back to Top]] | |
---- | |
| |
===== Titlebar decorations ===== | Windows can be in either an active(i.e. focused) or inactive(i.e. unfocused) state. For these, xfwm4 use pixmaps named accordingly: ''title-1-active.xpm'' and ''title-1-inactive.xpm''. |
As windows can be in either active ((focused)) or inactive ((unfocused)) states for which xfwm4 use pixmaps named accordingly e.g. title-1-active.xpm and title-1-inactive.xpm. | |
| |
For title bar decorations, xfwm4 uses 5 pixmaps named title-1-active.xpm to title-5-active.xpm with top-left-active.xpm and top-right-active.xpm making up the corners on each end as per figure 2 below. | |
| |
| {{ howto:xfwm4:xfwm4-window-pixmaps.gif |Figure 2 - The pixmaps that compose the whole window}} | | | {{ howto:xfwm4:xfwm4-window-pixmaps.gif |Figure 2 - The pixmaps that compose the whole window}} | |
| Figure 2 - The pixmaps that compose the whole window | | | Figure 2 - The pixmaps that compose the whole window | |
The same naming convention is true for unfocused windows with the word inactive substituted.e.g. title-1-inactive.xpm | |
| |
Title text colour and shadow options, alignment etc are set in the themerc file (detailed in the themerc section). | The same naming convention is true for unfocused windows with the word "inactive" substituted: for example, "title-1-inactive.xpm". |
| |
| Title text colour, shadow options, alignment, etc. are set in the [[#Themerc file|.themerc file]]. |
| |
[[|Back to Top]] | [[|Back to Top]] |
| |
===== Window Sidebars and bottom ===== | ===== Window Sidebars and bottom ===== |
Each side of a window is made up of two pixmaps. The pixmaps on the left side are named left-active.xpm and bottom-left-active.xpm. with the right side (of course) being made up of right-active.xpm and bottom-right-active.xpm. | |
| |
The Window bottom grab bar is made up of bottom-active.xpm and bottom-inactive.xpm pixmaps which will be repeated to fit as the window is resized. | Each side of a window is made up of two pixmaps. The pixmaps on the left side are named ''left-active.xpm'' and ''bottom-left-active.xpm''. The pixmaps on the right side of the window being made composed of ''right-active.xpm'' and ''bottom-right-active.xpm''. |
| |
N.B These pixmaps also make up the mouse grab handles so keep that in mind when deciding how many pixels wide they should be (particularly the bottom-left and bottom right pixmaps which make up the main resize handles on the windows). | The Window bottom grab bar is made up of ''bottom-active.xpm'' and ''bottom-inactive.xpm'' pixmaps which will be repeated to fit as the window is resized. |
| |
| **Note:** These pixmaps also make up the mouse grab handles. It is important to keep this in mind when deciding how many pixels wide they should be (particularly the bottom-left and bottom right pixmaps which make up the main resize handles on the windows). |
| |
[[|Back to Top]] | [[|Back to Top]] |
===== Xfwm4 Buttons ===== | ===== Xfwm4 Buttons ===== |
| |
Xfwm4 can use up to six action buttons - stick (sticky windows), menu, shade, hide, maximize and close. | Xfwm4 can use up to six action buttons: |
| * stick (sticky windows) |
| * menu |
| * shade |
| * hide |
| * maximize |
| * close. |
| |
Buttons have active ((focused)), inactive ((unfocused)), prelight and pressed states. As per figures 3 below: | Buttons can have the following states: |
AbiWord Image menu-active.gif AbiWord Image menu-inactive.gif AbiWord Image image_2.gif | * active(i.e. focused) |
| * inactive(i.e. unfocused) |
| * prelight |
| * pressed states |
| |
| As per figure 3: |
| |
^ Figure 3 - Xfwm4 button states ^ | ^ Figure 3 - Xfwm4 button states ^ |
| {{howto:xfwm4:image_2.gif}} {{howto:xfwm4:menu-inactive.gif}} {{howto:xfwm4:menu-active.gif}} | | | {{howto:xfwm4:image_2.gif|pressed button state}} {{howto:xfwm4:menu-inactive.gif|inactive button state}} {{howto:xfwm4:menu-active.gif|active button state}} | |
| |
Xfwm4 can also used "toggled" buttons to indicated whether buttons are toggled on or off - figure 4. | Xfwm4 can also use "toggled" buttons to indicated whether buttons are toggled on or off - See figure 4. |
AbiWord Image stick-active.gif AbiWord Image stick-inactive.gif AbiWord Image stick-pressed.gif AbiWord Image stick-toggled-active.gif AbiWord Image image_3.gif AbiWord Image stick-toggled-pressed.gif | - On the left: |
| - stick pressed |
| - stick inactive |
| - stick active |
| - On the right: |
| - stick toggled pressed |
| - stick toggled inactive |
| - stick toggled active |
| |
^ Figure 4 - Stick buttons with extra toggled buttons ^^ | ^ Figure 4 - Stick buttons with extra toggled buttons ^^ |
| {{howto:xfwm4:stick-active.gif}} {{howto:xfwm4:stick-inactive.gif}} {{howto:xfwm4:stick-pressed.gif}} | {{howto:xfwm4:stick-toggled-pressed.gif}} {{howto:xfwm4:stick-toggled-active.gif}} {{howto:xfwm4:image_3.gif}} | | | {{howto:xfwm4:stick-pressed.gif|stick button pressed}} {{howto:xfwm4:stick-inactive.gif|stick button inactive}} {{howto:xfwm4:stick-active.gif|stick button active}} | {{howto:xfwm4:stick-toggled-pressed.gif|stick button toggled pressed}} {{howto:xfwm4:image_3.gif|stick button toggled inactive}} {{howto:xfwm4:stick-toggled-active.gif|stick toggled active}} | |
| |
| As of Xfwm4 4.6, a new button effect of the active window is available called prelight. Hovering the mouse over the buttons, the picture becomes clearer. This can be used in all of the six active buttons. |
| |
| [[|Back to Top]] |
| ---- |
| |
| ===== Themes locations ===== |
| In Xfwm4, desktop themes are searched for in the following directories: |
| |
| * User's home directory |
| * ''~/.themes/" |
| * For example: "/home/jane_doe/.themes/b5/xfwm4" |
| * System's shared data directory "$XDG_DATA_DIRS/themes" |
| * "/themes/theme_name/xfwm4" controlled by the package manager. |
| * For example: "/usr/share/themes/b5/xfwm4" |
| * System's shared data directory controlled by the local administrator |
| * "/local/themes/theme_name/xfwm4" |
| * For example: "/usr/local/share/themes/b5/xfwm4" |
| |
Xfwm4 4.6 brings a new button effect of the active window called prelight. Hovering the mouse over the buttons, the picture becomes clearer. Can be used in the six active buttons. | The "xfwm4" theme location follows the Freedesktop standard [[https://www.freedesktop.org/wiki/DesktopThemeSpec/|Desktop Theme Specification]]. |
| |
[[|Back to Top]] | [[|Back to Top]] |
| |
[[|Back to Top]] | [[|Back to Top]] |
---- | |
| |
===== Conclusion ===== | |
I hope this small "how-to" for creating themes for xfwm4 will help you design your own themes. It would be great if you could share your themes with others on [[http://www.xfce-look.org]] (which is the preferred site for Xfce related themes) or from [[http://browse.deviantart.com/customization/skins/linuxutil/xfce/?alltime=yes#order=9]]. | |
| |
[[|Back to Top]] | |
---- | ---- |
| |
| bottom-left-active | bottom-left-inactive | | | | | | | | | bottom-left-active | bottom-left-inactive | | | | | | | |
| left-active | left-inactive | | | | | | | | | left-active | left-inactive | | | | | | | |
===== Credits ===== | |
This how-to has been started by Drewbian (drewbian at tsn dot cc) and later modifed by Olivier Fourdan (fourdan at xfce dot org) and Renato Santos (renatosan at gmail dot com). | ---- |
| |
| ===== Xfwm 4.20 new functionality ===== |
| Xfwm 4.20 introduces the ability to have bitmaps that stretch across each side of the window decorations. This feature allows for things such as horizontal gradients - prior to this, with tiling as the only option, only vertical gradients were possible. |
| |
| Xfwm will use parts with the suffix "-stretch" if they exist, like so: |
| |
| ^ Original ^ Stretched ^ |
| | top-left-active | top-left-active-stretch | |
| | top-active | top-active-stretch | |
| | top-right-active | top-right-active-stretch | |
| | left-active | left-active-stretch | |
| | right-active | right-active-stretch | |
| | bottom-left-active | bottom-left-active-stretch | |
| | bottom-active | bottom-active-stretch | |
| | bottom-right-active | bottom-right-active-stretch | |
| |
| The same of course applies to the "inactive" variants of each part. |
| |
| It is recommended you still supply a non-stretched variant of theme parts for backwards compatibility purposes. Since this is additive, supplying both non-stretched and stretched will mean users of Xfwm <= 4.18 will use the tiled version, and >= 4.20 will use the stretched version. |
| |
| ---- |
| |
| ===== Conclusion ===== |
| I hope this small "how-to" for creating themes for xfwm4 will help you design your own themes. It would be great if you could share your themes with others on [[http://www.xfce-look.org]] (which is the preferred site for Xfce related themes) or from [[http://browse.deviantart.com/customization/skins/linuxutil/xfce/?alltime=yes#order=9]]. |
| |
[[|Back to Top]] | [[|Back to Top]] |
---- | ---- |
[[:howto:install_new_themes:|Back to HowTo install themes page]] | [[:howto:install_new_themes:|Back to HowTo install themes page]] |