Is there a way to theme the notifications in XFCE?
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?.
Solution 1:
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:
You'll see our new playtime
theme.
customisation
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 { ... }
:
So where to we get the font name - easiest place is actually the Font Window in the Appearance window:
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:
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: