Change notifications size

Hi,

Is there a way to change the notifications size? I would like to have them smaller in size.

Thank you.

1 Like

Do you mean the font size of the text in the notification pop-up banner?

You can theme your notification banners by modifying the gtk.css file of your theme. First, determine which theme you are using. After that, navigate to the directory your theme is installed in. For example, if you are using Adwaita, you can look inside /usr/share/themes/Adwaita/xfce-notify-4.0/gtk.css and see what you can change there (Hint: pay attention to the #XfceNotifyWindow.osd label#body selector). Note that for themes installed locally, you must look inside ~/.themes, not /usr/share/themes.

Thank you. No, I mean the box size in which the text appear and it’s position (I would like to have it at the top right with no space left on top and right.

In that case, try to run the command xfce4-notifyd-config on the command line. You should see a dialog box pop up that allows you to tweak the settings. I’m not sure what options are available since I’m no longer using xfce.

2 Likes

Maybe files

  • /usr/share/themes/Bright/xfce-notify-4.0/gtk.css
  • /usr/share/themes/Retro/xfce-notify-4.0/gtk.css
  • /usr/share/themes/Default/xfce-notify-4.0/gtk.css
  • /usr/share/themes/ZOMG-PONIES!/xfce-notify-4.0/gtk.css
  • /usr/share/themes/Smoke/xfce-notify-4.0/gtk.css

can give you tips how to do so. For example, min-height seems to be related.
Hmm… tried it but no success…

2 Likes

Sorry for the late reply, yes, thanks, I already tried that but it doesn’t offer any customization.

Navigate into your theme’s directory (inside /usr/share/themes/<your_theme>/xfce-notify-4.0) and look for a file called gtk.css

Post the contents of that file.

If you know some CSS, you probably know what to do by now. Inside the gtk.css file, you should see a bunch of selectors that you can tweak. Under #XfceNotifyWindow .osd, there should be CSS properties like height and width. Change those values to your liking.

1 Like

Thank you.

My theme is Arc Darker. So I navigate to: /usr/share/themes/Arc-Darker/ , there I have:

I am looking for a gtk.css file. The ones I can find are inside the gtk-3.0 folder and gtk-4.0, when I open them (in the gtk-3.0 folder) I have:

For gtk.css:

@import url(“resource:///org/gnome/arc-theme/gtk-main-darker.css”);

For : gtk-dark.css

@import url(“resource:///org/gnome/arc-theme/gtk-main-dark.css”);

I also have the same contents for gtk.css and gtk-dark.css inside the gtk-4.0 folder.

Can you look for this file instead: ~/.config/gtk-3.0/gtk.css

Inside that file, add:

#XfceNotifyWindow {
    min_width: somevalue;
    min_height: somevalue;
    max_width: somevalue;
    max_height: somevalue;   
}

You’ll have to play around with the values to see which ones you prefer.

For more information on the aforementioned CSS properties, refer to this:

1 Like

Thank you. Unfortunately it didn’t change anything to the notifications. I tried with px and %, no changes. Upon reboot the modifications made in ~/.config/gtk-3.0/gtk.css were lost, the file seems to be reset.

Hello,

I noticed that the size of the popup follow the size of the desktop font, if you increase the font size it’s getting bigger, if you reduce it it’s getting smaller.