Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
howto:xfwm4_theme [2014/01/09 23:16] – [Window Sidebars and bottom] p0ng | howto:xfwm4_theme [2024/12/14 02:09] (current) – improved grammar & formatting kevinbowen | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Xfwm4 theme how-to ====== | + | ~~NOTOC~~ |
+ | ====== Xfwm4 Window Component and Theming | ||
+ | |||
+ | * **[[#Window Components|Window Components & Definitions]]** | ||
+ | * **[[# | ||
+ | * **[[#Window Sidebars and bottom|Window Sidebars and bottom]]** | ||
+ | * **[[#Xfwm4 Buttons|Xfwm4 Buttons]]** | ||
+ | * **[[#Themes locations|Themes locations]]** | ||
+ | * **[[# | ||
+ | * **[[#Gtk Color pickup|Gtk Color pickup]]** | ||
+ | * **[[#XPM (X PixMap) format|XPM (X PixMap) format]]** | ||
+ | * **[[#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]]** | ||
+ | * **[[# | ||
+ | |||
+ | ---- | ||
===== Introduction ===== | ===== Introduction ===== | ||
- | Xfwm4, | + | Xfwm4, |
{{ howto: | {{ howto: | ||
- | ===== Themes locations ===== | + | ---- |
- | In Xfwm4 version 4.0, the themes are searched in the following directories: | + | |
- | + | ||
- | * User's home dir / | + | |
- | * System' | + | |
- | + | ||
- | In Xfwm version 4.2, the theme location is in line with the standard, searched in the following directories: | + | |
- | + | ||
- | * User's home dir / | + | |
- | * System' | + | |
+ | ====== Window Components ====== | ||
===== Titlebar decorations ===== | ===== Titlebar decorations ===== | ||
- | 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 | + | For title bar decorations, |
- | For title bar decorations, xfwm4 uses 5 pixmaps named title-1-active.xpm | + | |
+ | Windows can be in either an active(i.e. focused) or inactive(i.e. unfocused) state. | ||
| {{ howto: | | {{ howto: | ||
| 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 " |
+ | Title text colour, shadow options, alignment, etc. are set in the [[#Themerc file|.themerc file]]. | ||
+ | [[|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 '' |
+ | |||
+ | The Window bottom grab bar is made up of '' | ||
+ | |||
+ | **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]] | ||
+ | ---- | ||
- | 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). | ||
===== Xfwm4 Buttons ===== | ===== Xfwm4 Buttons ===== | ||
- | Xfwm4 can use up to six action buttons | + | Xfwm4 can use up to six action buttons: |
+ | * stick (sticky windows) | ||
+ | * menu | ||
+ | * shade | ||
+ | * hide | ||
+ | * maximize | ||
+ | * close. | ||
- | Buttons have active ((focused)), inactive ((unfocused)) and pressed states. As per figures | + | Buttons |
- | AbiWord Image menu-active.gif | + | * active(i.e. focused) |
+ | * inactive(i.e. unfocused) | ||
+ | * prelight | ||
+ | * pressed states | ||
+ | |||
+ | As per figure | ||
^ Figure 3 - Xfwm4 button states ^ | ^ Figure 3 - Xfwm4 button states ^ | ||
- | | {{howto: | + | | {{howto: |
- | Xfwm4 can also used " | + | Xfwm4 can also use " |
- | AbiWord Image stick-active.gif | + | - On the left: |
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
^ Figure 4 - Stick buttons with extra toggled buttons ^^ | ^ Figure 4 - Stick buttons with extra toggled buttons ^^ | ||
- | | {{howto: | + | | {{howto: |
+ | |||
+ | 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 | ||
+ | * '' | ||
+ | * For example: "/ | ||
+ | * System' | ||
+ | * "/ | ||
+ | * For example: "/ | ||
+ | * System' | ||
+ | * "/ | ||
+ | * For example: "/ | ||
+ | |||
+ | The " | ||
+ | |||
+ | [[|Back to Top]] | ||
+ | ---- | ||
- | 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. | ||
===== Themerc file ===== | ===== Themerc file ===== | ||
Line 103: | Line 159: | ||
The " | The " | ||
+ | |||
+ | The " | ||
==== App icon ==== | ==== App icon ==== | ||
Line 110: | Line 168: | ||
* show_app_icon=false //#Shows the menu button// | * show_app_icon=false //#Shows the menu button// | ||
- | If you doesn't have a menu button, can be used a blank square. Or you cannot use this option. | + | If you don't have a menu button, |
+ | |||
+ | ==== Frame border top==== | ||
+ | XFWM Versions 4.14.1 and above can take advantage of this feature to crop the top frame border of maximized application windows. | ||
+ | |||
+ | * frame_border_top=0 //# | ||
+ | |||
+ | {{ howto: | ||
+ | |||
+ | * frame_border_top=2 //#Will crop the top 2 pixels off// | ||
+ | |||
+ | {{ howto: | ||
+ | |||
+ | |||
+ | [[|Back to Top]] | ||
+ | ---- | ||
===== Gtk Color pickup ==== | ===== Gtk Color pickup ==== | ||
- | As you have no doubt noticed when using Xfwm4' | + | As you have no doubt noticed when using Xfwm4' |
+ | |||
+ | ^ Name ^ Gtk value ^ Description ^ | ||
+ | | active_text_color | ||
+ | | inactive_text_color | ||
+ | | active_text_shadow_color | ||
+ | | inactive_text_shadow_color | dark[insensitive] | Shadow color for inactive window' | ||
+ | | active_border_color | ||
+ | | inactive_border_color | ||
+ | | active_color_1 | ||
+ | | active_color_2 | ||
+ | | active_hilight_1 | ||
+ | | active_hilight_2 | ||
+ | | active_mid_1 | ||
+ | | active_mid_2 | ||
+ | | active_shadow_1 | ||
+ | | active_shadow_2 | ||
+ | | inactive_color_1 | ||
+ | | inactive_color_2 | ||
+ | | inactive_hilight_1 | ||
+ | | inactive_hilight_2 | ||
+ | | inactive_mid_1 | ||
+ | | inactive_mid_2 | ||
+ | | inactive_shadow_1 | ||
+ | | inactive_shadow_2 | ||
+ | |||
+ | The Gtk values " | ||
+ | The symbols get replaced | ||
- | The color symbols are as follow : | + | To use the defined colors in the XFWM theme, the XPM files have to be edited. Since XPM files are plain text, they can be edited with your favorite text editor. |
- | ^ Name ^ Description ^ | + | |
- | | active_text_color | Text color on title for active window | | + | |
- | | inactive_text_color | Text color on title for inactive window | | + | |
- | | active_border_color | Very rarely used usually set to black | | + | |
- | | inactive_border_color | Idem | | + | |
- | | active_color_1 | Background color for active title | | + | |
- | | active_color_2 | Background color for active window | | + | |
- | | active_hilight_1 | Lighter color for active title for 3D look | | + | |
- | | active_hilight_2 | Lighter color for active window | | + | |
- | | active_mid_1 | Slightly darker color for active title | | + | |
- | | active_mid_2 | Slightly darker color for active window | | + | |
- | | active_shadow_1 | Darker color for active title for 3D look | | + | |
- | | active_shadow_2 | Darker color for active window | | + | |
- | | inactive_color_1 | Background color for inactive title | | + | |
- | | inactive_color_2 | Background color for inactive window | | + | |
- | | inactive_hilight_1 | Lighter color for inactive title for 3D look | | + | |
- | | inactive_hilight_2 | Lighter color for inactive window | | + | |
- | | inactive_mid_1 | Slightly darker color for inactive title | | + | |
- | | inactive_mid_2 | Slightly darker color for inactive window | | + | |
- | | inactive_shadow_1 | Darker color for inactive title for 3D look | | + | |
- | | inactive_shadow_2 | Darker color for inactive window | | + | |
- | The symbols get replaced by the actual color values at runtime so that the window borders inherits GTK theme colors automatically. | + | [[|Back to Top]] |
- | Xpm file format used natively by xfwm4 is no more than a plain text file that can be edited with your favorite text editor. | + | ---- |
- | ===== From Wikipedia, the free encyclopedia. | + | ===== XPM (X PixMap) format |
XPM (X PixMap) is an ASCII image format used by the X Window System. It was created in 1989 by Daniel Dardailler and Colas Nahaboo working in Inria Laboratories, | XPM (X PixMap) is an ASCII image format used by the X Window System. It was created in 1989 by Daniel Dardailler and Colas Nahaboo working in Inria Laboratories, | ||
Line 212: | Line 292: | ||
As a matter of fact, " | As a matter of fact, " | ||
+ | [[|Back to Top]] | ||
+ | ---- | ||
===== Xfwm 4.2 new functionality ===== | ===== Xfwm 4.2 new functionality ===== | ||
- | As simple as it is, the color symbol replacement table of the XPM format is not powerfull enough to achive | + | As simple as it is, the color symbol replacement table of the XPM format is not powerfull enough to achieve |
Xfwm 4.2 includes yet another functionality that gives real nice result while being still compatible with the previous theme format: It composes the final image from the XPM file and it colors replacement table, and another PNG file with transparency, | Xfwm 4.2 includes yet another functionality that gives real nice result while being still compatible with the previous theme format: It composes the final image from the XPM file and it colors replacement table, and another PNG file with transparency, | ||
Line 230: | Line 311: | ||
* It's backward compatible with xfwm4 from Xfce 4.0, the PNG files are just ignored by xfwm4 4.0. | * It's backward compatible with xfwm4 from Xfce 4.0, the PNG files are just ignored by xfwm4 4.0. | ||
+ | [[|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:// | + | |
- | + | ||
- | you can also find xfce theme at [[http:// | + | |
===== List of frame and button part names ===== | ===== List of frame and button part names ===== | ||
Line 260: | Line 338: | ||
| bottom-left-active | | bottom-left-active | ||
| left-active | | left-active | ||
- | ===== 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 | + | ---- |
+ | |||
+ | ===== Xfwm 4.20 new functionality | ||
+ | Xfwm 4.20 introduces the ability to have bitmaps that stretch across each side of the window decorations. | ||
+ | |||
+ | Xfwm will use parts with the suffix " | ||
+ | |||
+ | ^ Original | ||
+ | | top-left-active | ||
+ | | top-active | ||
+ | | top-right-active | ||
+ | | left-active | ||
+ | | right-active | ||
+ | | bottom-left-active | ||
+ | | bottom-active | ||
+ | | bottom-right-active | bottom-right-active-stretch | | ||
+ | |||
+ | The same of course applies to the " | ||
+ | |||
+ | 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 | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Conclusion ===== | ||
+ | I hope this small " | ||
+ | |||
+ | |||
+ | [[|Back to Top]] | ||
+ | ---- | ||
+ | [[: |