New features of xfce4-notifyd
Back in June, I started to hack on xfce4-notifyd to implement a smart notification placement. In the current stable version, if more two notifications are triggered at the same time, the new ones overlap with the old ones which makes them unreadable. My goal was to shift the notifications so that they would be all visible at the same time.
This turned out to be far more complicated than I had first thought, particularly because of multiple monitors support, but this has finally been committed to the master branch of xfce4-notifyd. I would like to thank Brian who took a lot of time to review my patch and gave me a lot of kicks advises on how to make things work or improve them.
Today, Brian also implemented a cool feature: it is now possible to display gauges (progress bars) or only an icon in a notification, as with notify-osd. Steve Dodier already took advantage of that in xfce4-volumed, which allows you to change the volume using the volume keys of your keyboard and displays beautiful notifications.
The following screen cast shows how things look currently:
New features of xfce4-notifyd (Jérôme Guelfucci) from Xfce on Vimeo.
As you can see notifications are displayed using columns. If a side of the screen is reached, another column is started. That way, you never get two overlapping notifications (well, in fact this can happen if the screen is full of notifications, but that shouldn't happen very often!). If you have several monitors, notifications are displayed on the active one. If a monitor is unplugged, notifications are moved to the other one.
Comments
Nice work.
Nice job! Very good. Thanks for the work brings to xfce.
I was wondering how much CPU-cycles it needs. Because on my current Xubuntu 9.04, my cores are almost in complete use when I adjust the brightness of my laptop-screen. Top shows an 78% CPU-usage by X-org, when rendering the notification icon + bar. I hope your implementation needs less for rendering the volume-notification.
top shows a maximum of 6% of CPU usage for xorg and 2% for xfce4-notifyd when using notifications with progress bars here. They should be the worst ones performance speaking.
@ShadowDragon this is probably kernel-related. For instance on my Dell Vostro 1510, in Xubuntu 9.04 (and probably in other OSes, thought I didn't try any lately on this machine), changing the brightness is horribly laggy, while it's perfectly smooth with my HP laptop.
@jeromeg: ah, that looks good. Thanks for the complete and quick reply!
@Steve Dodier: hé hé, surprise surprise, I have a Dell Vostro 1500. Thanks for the insights!
Is all the code to support this in git already? It seems not, I compiled from git today and there's no support for the x-canonical-private-synchronous hint.
I never said we supported x-canonical-private-synchronous, have a look at xfce4-volumed to see how you can get such effects easily without requiring this additional hint.
@jeromeg: Ah, it's done without the hint.
But the thing is I'm not using Xfce actually. I'd like to get volume display by calling notify-send in a script. The script I found (on the Arch forums) at the end calls: notify-send " " -i $icon_name -h int:value:$display_volume -h string:synchronous:volume
Is it possible to use notify-send for this without the synchronous hint?
Could anyone please give me a link to the wallpaper used in the video?
Hello,
this looks great! I hated notify-osd, but notification-daemon is ugly as hell, so xfce4-notifyd is a nice alternative. Is your code available anywhere?