Create custom XFCE themes by tweaking existing themes

Good Day Community,
I would like to tweak existing XFCE themes to “create” my own themes.
There are two elements that I would like to customize myself, but aren’t sure what exactly I’m looking for.
All I want to do is change the colour/theme of

  1. the category panel of the whisker menu
  2. Change the colour of the side pane in Thunar

I would like to change themes where these two elements are light to dark.

Thanks in advance

I am not sure if this is possible. I think, Thunar and Whisker use colours defined in the theme but if you change those colours, other elements of the theme also change colour. That is, I suppose, there is no special setting for particularly Thunar and Whisker but a more global setting for some subset of window elements, which will all be affected by the change.

See here …


… it uses Numix theme as a base and you can tweak to infinite.

1 Like

Maybe a stupid question, although people always say there are no stupid questions:
is there also a program like that for KDE? And if so, which one?

I’m not aware of something similar for KDE.

@fatboy Here are my notes on making such tweaks… many will become obsolete once things move to gtk3:

gtkrc-2.0 Settings

Created Saturday 28 November 2015

The Xfce Panel .gtkrc-2.0 hacks

All Plugins

Every plugin has a unique widget name. You can find this name by
hovering the plugin in the items tab in the panel preferences dialog.

XfcePanelWindow

style “xfce-panel-window-style”
{

Time in miliseconds before the panel will unhide on an enter event

XfcePanelWindow::popup-delay = 225

Time in miliseconds before the panel will hide on a leave event

XfcePanelWindow::popdown-delay = 350

Size of autohide window in pixels

XfcePanelWindow::autohide-size = 3
}
class “XfcePanelWindow” style “xfce-panel-window-style”

XfceActionsPlugin

You can set a custom icon size in gtk-icon-sizes with the name
panel-actions-menu. The default icon size is 16px.
Special widget name in this plugin is actions-button.

XfceShowDesktopPlugin

Special widget name in this plugin is showdesktop-button.

XfceTasklist

You can set a custom icon size in gtk-icon-sizes with the name
panel-tasklist-menu. The default icon size is 16px.

style “xfce-tasklist-style”
{

The maximum length of a button before the label ellipsizes.

When this value is set to -1 the button will expand to the

entire available space.

XfceTasklist::max-button-length = 200

Ellipsizing used in the task list and overflow menu labels.

XfceTasklist::ellipsize-mode = PANGO_ELLIPSIZE_END

Lucency of minimized icons. Valid values are between 0 (completely

hide the icon) and 100 (don’t lighten the icon).

XfceTasklist::minimized-icon-lucency = 50

Maximum number of characters in the menu label before it will

be ellipsized.

XfceTasklist::menu-max-width-chars = 24
}
class “XfceTasklist” style “xfce-tasklist-style”

XfceLauncherPlugin

You can set a custom menu and tooltip icon size in gtk-icon-sizes
with the name panel-launcher-menu and panel-launcher-tooltip. The default
icon sizes are both 32px.
Special widget names in this plugin are launcher-button and launcher-arrow.

XfcePanelImage

style “xfce-panel-image-style”
{

Fix the panel images to a default gtk icon size, is only works for

images below 32 pixels. You can for example use this when you have

fuzzy launcher icons.

XfcePanelImage::force-gtk-icon-sizes = true
}
class “XfcePanelImage” style “xfce-panel-image-style”

XfceWindowMenuPlugin

You can set a custom icon size in gtk-icon-sizes with the name
panel-window-menu. The default icon size is 16px. Note that the window
icons are 16 or 32 pixels, all other sizes will result in scaling.
Special widget name in this plugin is windowmenu-button.

style “xfce-window-menu-plugin-style”
{

Ellipsizing used in the menu label.

XfceWindowMenuPlugin::ellipsize-mode = PANGO_ELLIPSIZE_MIDDLE

Maximum number of characters in the menu label before it will

be ellipsized.

XfceWindowMenuPlugin::max-width-chars = 24

Lucency of minimized icons. Valid values are between 0 (completely

hide the icon) and 100 (don’t lighten the icon).

XfceWindowMenuPlugin::minimized-icon-lucency = 50
}
class “XfceWindowMenuPlugin” style “xfce-window-menu-plugin-style”

XfceDirectoryMenuPlugin

You can set a custom icon size in gtk-icon-sizes with the name
panel-directory-menu. The default icon size is 16px.
Special widget name in this plugin is directorymenu-button.

XfceApplicationsMenuPlugin

You can set a custom icon size in gtk-icon-sizes with the name
panel-applications-menu. The default icon size is 16px.
Special widget name in this plugin is applicationmenu-button.

This is the .gtkrc-2.0 that I would use to force [dark numix style] colors on whisker :

style "darkback"
{
        bg[NORMAL] = "#404040"
        bg[ACTIVE] = "#606060"
        bg[PRELIGHT] = "#808080"
        fg[NORMAL] = "#ccc"
        fg[ACTIVE] = "#fff"
        fg[PRELIGHT] = "#fff"
}
widget "whiskermenu-window*" style "darkback"

You can use that file to overwrite still … but you could wade through the theme looking for similar values.

Another thing to mention is that alot of window decorations are just image files in XFWM folder … easily switched out using GIMP or Inkscape.

Thank You all for the great posts. Will look into it asap.

@cscs I don’t have that .gtkrc-2.0 file, should I just create one?

All I want is a darkback whisker menu (just like Vertex-Maia-square) and a dark side pane (not the folders window) for Thunar (Just like the arc theme).

yeah, it would work elsewhere in .config, but I always put it in ~/.gtkrc-2.0

Will this change be forced upon all themes, meaning I will always have the aforementioned tweaks visible?

Yes - it is going to be applied for that user across all themes …

More of an override, whereas if you copied a theme folder, renamed it, and looked around you could find the variables that determine such things inside the theme (or call the values to specific widgets if necessary)

1 Like

I did try this, but couldn’t find it. Think I should try again.
Thanks.
Another question, what would be the easiest way to override the tweaks in the .gtkrc-2.0 folder? Comment the tweaks out?

No no, You misunderstand … (I guess I said ‘in’)
It should be a single text file “~/.gtkrc-2.0” In which you apply any overrides.

Ex: If all I wanted was my dark numixy whisker menu the file would be empty besides the above code.

But you can use the bg[x],fg[x] and syntax as an outline
see more here : http://wiki.xfce.org/tips

Thank You. I opened a dark theme and saw what you posted

Next I am going to “create” my own theme and add those lines to the gtkrc file in the gtk-2.0 folder of a theme.
Thank You.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by