Xfce Wiki

Sub domains
 

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
howto:xfwm4_theme [2007/12/08 17:55]
88.172.125.130 created
howto:xfwm4_theme [2015/01/06 14:30] (current)
killermoehre [Themes locations]
Line 16: Line 16:
  
     * User's home dir /​.themes/​theme_name/​xfwm4 (e.g.: "/​home/​joe/​.themes/​b5/​xfwm4"​)     * User's home dir /​.themes/​theme_name/​xfwm4 (e.g.: "/​home/​joe/​.themes/​b5/​xfwm4"​)
-    * System'​s shared data directory /​themes/​theme_name/​xfwm4 (e.g.: "/​usr/​share/​themes/​b5/​xfwm4"​) +    * System'​s shared data directory /​themes/​theme_name/​xfwm4 ​controlled by the package manager ​(e.g.: "/​usr/​share/​themes/​b5/​xfwm4"​) 
- +    * System'​s shared data directory /​local/​themes/​theme_name/​xfwm4 controlled by the local administrator (e.g.: "/​usr/​local/​share/​themes/​b5/​xfwm4"​)
- +
 ===== 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 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 ​below. +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 ​below.
- +
-{{ howto:​xfwm4:​xfwm4-window-pixmaps.gif |Figure 2 - The pixmaps that compose the whole window}}+
  
-Pixmaps of a xfwm4 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 ​ |
 The same naming convention is true for unfocused windows with the word inactive substituted.e.g. title-1-inactive.xpm The same naming convention is true for unfocused windows with the word inactive substituted.e.g. title-1-inactive.xpm
  
Line 35: Line 32:
  
 ===== 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.+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. 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.
  
 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). 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 - stick (sticky windows), menu, shade, hide, maximize and close. Xfwm4 can use up to six action buttons - stick (sticky windows), menu, shade, hide, maximize and close.
  
-Buttons have active ((focused)),​ inactive ((unfocused)) and pressed states. ​as per figures 3 below:+Buttons have active ((focused)),​ inactive ((unfocused)), prelight ​and pressed states. ​As per figures 3 below:
 AbiWord Image menu-active.gif ​   AbiWord Image menu-inactive.gif ​  ​AbiWord Image image_2.gif AbiWord Image menu-active.gif ​   AbiWord Image menu-inactive.gif ​  ​AbiWord Image image_2.gif
  
Line 56: Line 53:
 |  {{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-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}} ​  |
  
 +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 89: Line 87:
 ==== Text shadow ==== ==== Text shadow ====
 A shadow can be added to the title text by setting the boolean value "​title_shadow_active"​ for the focused window, and "​title_shadow_inactive"​ for the other unfocused windows. A shadow can be added to the title text by setting the boolean value "​title_shadow_active"​ for the focused window, and "​title_shadow_inactive"​ for the other unfocused windows.
 +
 +Possible values are "​false",​ "​true",​ and "​frame"​.
  
 ==== Title offset ==== ==== Title offset ====
Line 102: Line 102:
 The "​button_spacing"​ value gives the number of pixels between each button. The "​button_spacing"​ value gives the number of pixels between each button.
  
 +The "​maximized_offset"​ value places a space between the right edge (top-right-active) and the button (close, hide...) when maximized.
 +
 +==== App icon ====
 +With **show_app_icon** option you can replace the menu button with application icon. The application icon will be limited by width of menu button. Stay tuned!
 +
 +  * show_app_icon=true //#Shows the application icon//
 +  * show_app_icon=false //#Shows the menu button//
 +
 +If you don't have a menu button, you can use a blank square. Or you cannot use this option.
 ===== Gtk Color pickup ==== ===== Gtk Color pickup ====
-As you have no doubt noticed when using Xfwm4'​s default theme it is possible to make themes "​pick-up"​ gtk theme coloursIt's not just running ​the gimp and draw the buttonsMost themes use a color symbol table. That means the xpm file must be opened and edited by hand.+As you have no doubt noticed when using Xfwm4'​s default theme, the theme uses the colors of the current Gtk theme. ​Colors for an XFWM theme can be defined in the theme'​s ​themrc file. If they are not defined there, they are picked up from the current Gtk themeThe following colors are used: 
 + 
 +^ Name ^ Gtk value ^ Description ^ 
 +| active_text_color ​         | fg[selected] | Text color on title for active window | 
 +| inactive_text_color ​       | fg[insensitive] | Text color on title for inactive window | 
 +| active_text_shadow_color ​  | dark[selected] | Shadow color for active window'​s title | 
 +| inactive_text_shadow_color | dark[insensitive] | Shadow color for inactive window'​s title | 
 +| active_border_color ​       | fg[normal] | Very rarely used usually set to black | 
 +| inactive_border_color ​     | fg[normal] | Idem | 
 +| active_color_1 ​            | bg[selected] | Background color for active title | 
 +| active_color_2 ​            | bg[normal] | Background color for active window | 
 +| active_hilight_1 ​          | light[selected] | Lighter color for active title for 3D look | 
 +| active_hilight_2 ​          | light[normal] | Lighter color for active window | 
 +| active_mid_1 ​              | mid[selected] | Slightly darker color for active title | 
 +| active_mid_2 ​              | mid[normal] | Slightly darker color for active window | 
 +| active_shadow_1 ​           | darkselected[] | Darker color for active title for 3D look | 
 +| active_shadow_2 ​           | dark[normal] | Darker color for active window | 
 +| inactive_color_1 ​          | bg[insensitive] | Background color for inactive title | 
 +| inactive_color_2 ​          | bg[normal] | Background color for inactive window | 
 +| inactive_hilight_1 ​        | light[insensitive] | Lighter color for inactive title for 3D look | 
 +| inactive_hilight_2 ​        | light[normal] | Lighter color for inactive window | 
 +| inactive_mid_1 ​            | mid[insensitive] | Slightly darker color for inactive title | 
 +| inactive_mid_2 ​            | mid[normal] | Slightly darker color for inactive window | 
 +| inactive_shadow_1 ​         | dark[insensitive] | Darker color for inactive title for 3D look | 
 +| inactive_shadow_2 ​         | dark[normal] | Darker color for inactive window |
  
-The color symbols ​are as follow : +The Gtk values "​fg"​ and "​bg" ​are defined in the gtkrc file of the current Gtk theme. Please notice that the values "​dark",​ "​light"​ and "​mid"​ can not be defined in the gtkrc but are computed (dark = 0.7 * bg, light = 1.3 * bg, mid = 0.5 * (dark + light)). 
-^ Name ^ Description ^ +The symbols get replaced by the actual ​color values at runtime so that the window ​border can inherit Gtk theme colors automatically,​ unless they are defined in the themerc.
-| 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_hilight_1 | Lighter color for active title for 3D look | +
-| active_shadow_1 | Darker color for active title for 3D look | +
-| active_mid_1 | Slightly darker color for active title | +
-| active_color_2 | Background color for active window | +
-| active_hilight_2 | Lighter color for active window | +
-| active_shadow_2 | Darker color for active window | +
-| active_mid_2 | Slightly darker color for active window | +
-| inactive_color_1 | Background color for inactive title | +
-| inactive_hilight_1 | Lighter color for inactive title for 3D look | +
-| inactive_shadow_1 | Darker color for inactive title for 3D look | +
-| inactive_mid_1 | Slightly darker color for inactive title | +
-| inactive_color_2 | Background color for inactive window | +
-| inactive_hilight_2 | Lighter color for inactive window | +
-| inactive_shadow_2 | Darker color for inactive window | +
-| inactive_mid_2 | Slightly 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. +To use the defined colors in the XFWM theme, the XPM files have to be editedSince XPM files are plain text, they can be edited with your favorite text editor.
-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. ===== ===== From Wikipedia, the free encyclopedia. =====
Line 208: Line 220:
  
 ===== 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 ​the nice color gradients seen in most recent themes.+As simple as it is, the color symbol replacement table of the XPM format is not powerfull enough to achieve ​the nice color gradients seen in most recent themes.
  
 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,​ if present. 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,​ if present.
Line 228: Line 240:
 you can also find xfce theme at [[http://​www.xfce-look.org]] you can also find xfce theme at [[http://​www.xfce-look.org]]
  
-===== Credits ​===== +===== List of frame and button part names =====
-This how-to has been started by Drewbian (drewbian at tsn dot cc) and later modifed by Olivier Fourdan (fourdan at xfce dot org).+
  
 +This is a list of all possible part names in a decoration, so you can easily copy and paste them. (Tip: if using Firefox hold Ctrl while dragging, to select cells instead of lines. ;-))
 +
 +^ Active ​             ^ Inactive ​             ^ Prelight (buttons only) ^ Pressed (buttons only) ^ Toggled active (buttons only) ^ Toggled inactive (buttons only) ^ Toggled prelight (buttons only) ^ Toggled pressed (buttons only) ^
 +| menu-active ​        | menu-inactive ​        | menu-prelight ​    | menu-pressed ​    ​| ​                        ​| ​                          ​| ​                          ​| ​                         |
 +| shade-active ​       | shade-inactive ​       | shade-prelight ​   | shade-pressed ​   | shade-toggled-active ​   | shade-toggled-inactive ​   | shade-toggled-prelight ​   | shade-toggled-pressed ​   |
 +| stick-active ​       | stick-inactive ​       | stick-prelight ​   | stick-pressed ​   | stick-toggled-active ​   | stick-toggled-inactive ​   | stick-toggled-prelight ​   | stick-toggled-pressed ​   |
 +| hide-active ​        | hide-inactive ​        | hide-prelight ​    | hide-pressed ​    ​| ​                        ​| ​                          ​| ​                          ​| ​                         |
 +| maximize-active ​    | maximize-inactive ​    | maximize-prelight | maximize-pressed | maximize-toggled-active | maximize-toggled-inactive | maximize-toggled-prelight | maximize-toggled-pressed |
 +| close-active ​       | close-inactive ​       | close-prelight ​   | close-pressed ​   |                         ​| ​                          ​| ​                          ​| ​                         |
 +| top-left-active ​    | top-left-inactive ​    ​| ​                  ​| ​                 |                         ​| ​                          ​| ​                          ​| ​                         |
 +| title-1-active ​     | title-1-inactive ​     |                   ​| ​                 |                         ​| ​                          ​| ​                          ​| ​                         |
 +| title-2-active ​     | title-2-inactive ​     |                   ​| ​                 |                         ​| ​                          ​| ​                          ​| ​                         |
 +| title-3-active ​     | title-3-inactive ​     |                   ​| ​                 |                         ​| ​                          ​| ​                          ​| ​                         |
 +| title-4-active ​     | title-4-inactive ​     |                   ​| ​                 |                         ​| ​                          ​| ​                          ​| ​                         |
 +| title-5-active ​     | title-5-inactive ​     |                   ​| ​                 |                         ​| ​                          ​| ​                          ​| ​                         |
 +| top-right-active ​   | top-right-inactive ​   |                   ​| ​                 |                         ​| ​                          ​| ​                          ​| ​                         |
 +| right-active ​       | right-inactive ​       |                   ​| ​                 |                         ​| ​                          ​| ​                          ​| ​                         |
 +| bottom-right-active | bottom-right-inactive |                   ​| ​                 |                         ​| ​                          ​| ​                          ​| ​                         |
 +| bottom-active ​      | bottom-inactive ​      ​| ​                  ​| ​                 |                         ​| ​                          ​| ​                          ​| ​                         |
 +| bottom-left-active ​ | bottom-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).