I'm kinda bored of how they look and the fact that there's only 3 themes to choose from is even worse, so I was wondering if there is a way to theme the notification bubbles of XFCE?.


Theming the xfce notifications

The themes of the notification bubble defined by a specially formatted file called gtkrc found within the folder structure /usr/share/themes/[theme name]/xfce-notify-4.0

All system-wide themes must follow the above naming convention.

For user-specific notification bubbles, the same [theme name]/xfce-notify-4.0/gtkrc file & folder structure can be created in your home folder ~/.themes

Lets create a copy of an existing notification bubble theme to work with - our new theme is going to be called playtime:

mkdir -p ~/.themes/playtime/xfce-notify-4.0
cp /usr/share/themes/Greybird/xfce-notify-4.0/gtkrc ~/.themes/playtime/xfce-notify-4.0/

Now launch the notification manager in system settings:

enter image description here

You'll see our new playtime theme.


Now lets have some fun with customizing this theme.

Open the gtkrc file for playtime

leafpad ~/.themes/playtime/xfce-notify-4.0/gtkrc

When customising the theme - change to another notification theme and back to playtime for the change to take effect.

changing the font

The bit in this file we are interested in to customise the text is this section:

style "greybird-notify-text"
    fg[NORMAL] = "#ffffff"
    GtkWidget::link-color = "#a7a7a7"

We can customise the font by adding font_name = "Serif 18" to this (between the { ... }:

enter image description here

So where to we get the font name - easiest place is actually the Font Window in the Appearance window:

enter image description here

Just add the text descriptions together as shown - for example Serif Italic 10

changing the font colour

We can change the font colour by modifying the RBG format number i.e. ff0000 is Red, 00ff00 is Blue and 0000ff Green - other colours are mixtures of these.

Thus - fg[NORMAL] = "#ff0000" gives us this:

enter image description here

changing the background colour

The bit in this file we are interested in to customise the background colour is this section:

style "greybird-notify-window"
    XfceNotifyWindow::summary-bold = 1
    bg[NORMAL] = "#111" 
    XfceNotifyWindow::border-color = "#ffffff"
    XfceNotifyWindow::border-radius = 10.0
    XfceNotifyWindow::border-width = 3.0

The bg[NORMAL] value is again in RBG format - e.g. #00ff00 is green:

enter image description here

  • Is it possible to use Image files as background? – Uri Herrera Aug 4 '12 at 23:05
  • @UriHerrera - I've look at this - the widget control appears to be limited to fonts/font sizes/font colours and background colours - no image control. I've tried the usual CSS syntax for images but this results in the whole notification theme using the plain "Default" theme :( – fossfreedom Aug 4 '12 at 23:25
  • I see, what about the XML syntax that gtk 2 themes used? that doesn't work either?. – Uri Herrera Aug 4 '12 at 23:32
  • looking at notify-osd source code I dont see any evidence of image handling capabilities of the notification bubble system. Sorry about that. – fossfreedom Aug 5 '12 at 11:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.