Sunday, May 08, 2011

Configurable NotifyOSD Bubbles For Ubuntu: Move, Close On Click, Change Colors And More

Configurable notifyosd Ubuntu 11.04

NotifyOSD - the default notification bubbles in Ubuntu - don't allow any kind of customization: you can't change the colors, screen position and you can't close them.

Leolik provides a PPA that allows you to customize the Ubuntu notifications:
  • colors
  • size of the bubbles, font size, icon size, corner radius
  • opacity
  • timeout
  • position on the screen (you can place NotifyOSD notifications in any screen corner)
  • disable fade out
  • click anywhere on the notification to close them

The last two options have been added Faheem Pervez. Oh and all the options above are of course optional.


Here is a video I've just recorded to see exactly how everything works:






Install the patched (configurable) NotifyOSD in Ubuntu 11.10 or 11.04


1. Install the patched NotifyOSD for Ubuntu:

sudo add-apt-repository ppa:leolik/leolik 
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install libnotify-bin
pkill notify-osd

2. Install NotifyOSD Config - a GUI to configure NotifyOSD (unfortunately it hasn't been updated to support all the options so for now it can only be used for changing the colors and the fixed / dynamic position):

NotifyOSD Config

sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install notifyosdconfig



How to use


You can use NotifyOSD Config for changing various parts of the NotifyOSD notification bubbles: colors, size, and so on, as well as change between fixed or dynamic position. The "fixed" position is the default one and "dynamic" means there will be no gap between the top panel and the notification bubbles.

But there are some more tweaks that you need apply manually. For instance, you can position the notification bubbles in some other screen corner. To do this, run the following command:

- For Ubuntu 11.04:
gconftool-2 -s /apps/notify-osd/gravity --type=int [number]

- For Ubuntu 11.10:
gsettings set com.canonical.notify-osd gravity [number]


where is [number] can be:
1 - top-right corner
2 - middle-right
3 - bottom-right corner
4 - bottom-left corner
5 - middle-left
6 - top-left corner

To prevent the NotifyOSD notifications fading out, paste the following code in the ~/.notify-osd file:
bubble-prevent-fade = 1

After changing this, restart NotifyOSD:
pkill notify-osd

And to be able to close the notifications by clicking on them, in the same ~/.notify-osd file, paste this:
bubble-close-on-click = 1

After changing this, restart NotifyOSD:
pkill notify-osd

To test the changes, run:
notify-send --icon=gtk-add "Test notification" "This is the message body"

Important: once you run NotifyOSD Config tool, these two last options (to prevent fading and to close the notification bubbles on click) will be removed from the ~/.nofiy-osd file so use NotifyOSD Config firstly and then tweak this or remember to add these options back to the file if you use the config tool later on.



For Ubuntu 10.10, see our old post: Tweak The NotifyOSD Notifications In Ubuntu 10.10 Maverick Meerkat [Patched NotifyOSD PPA Updated]


Many thanks to Faheem Pervez for the PPA and to chimerarevo.com for the news