Volutions - ID | News | Gadget | Tutorial | Freeware | Template | Etc.: notifications
Showing posts with label notifications. Show all posts
Showing posts with label notifications. Show all posts

Get Notifications With A Close Button In Ubuntu

Awn notification daemon

A lot of people want a close button for the Ubuntu notifications but unfortunately this won't happen - they don't want NotifyOSD to be customizable. But you can get notifications that have a close button by using the AWN Notifications Daemon.

We have a patched NotifyOSD that provides options to move the notifications to a different corner and such, but unfortunately it doesn't have an option to add a close button, however not many people are aware of the "Notification daemon" Avant Window Navigator applet. This applet has been around for a long time and it replaces NotifyOSD, providing some cool customizations (and of course, the notifications have a close button!): you can place the notifications anywhere on the screen, you can set it to display an icon in AWN that you can use to turn the notifications on/off with a click, set a sound for the notifications, specify custom colors for the notifications (or use the AWN theme colors), transparent (gradient factor) and more.

There's only one feature missing in the AWN Notification Daemon: there's no option to configure the font size. You can configure the font color, make the text body bold, but you can't change the font size and while the notifications look ok when using the default Ubuntu 10.10 font size (11 - but it looks ok with a font size of 10 too), it looks kind of small on my system with my preferred font size (9).


How to configure AWN Notification Daemon


Gconf editor AWN notifications daemon

To use the Avant Window Navigator Notification Daemon applet, simply install Avant Window Navigator and all the extra applets and add the "Notification Daemon" to the dock.

AWN Notification Daemon applet doesn't have a settings dialog, but you can tweak it using Gconf Editor. To customize it, press ALT + F2 and enter:
gconf-editor

Then navigate to apps > awn-applet-notification-daemon (this is for the latest AWN from the AWN trunk PPA, it may be apps > avant-window-navigator > awn-applet-notification-daemon on older versions of Avant Window Navigator). Clicking a key will display its description at the bottom so you'll know how to tweak it. The most important key is: "kill_standard_daemon" - make sure this is enabled or else the AWN notifications won't work.

For instance, "override_x" is the horizontal position on the screen (for which I've used "1900" because my screen width is 1920 and I want the notifications to be displayed on the right), "override_y" is the vertical position (for which I've used "30" so the notification dialog is displayed in the top right corner) and "gradient_factor" is the transparency. That should be enough to get you started.

To customize the colors, uncheck the "use_theme" box, then specify a "text_colour" and "bg_colour" and so on.

An important feature you may want to turn on is "show_icon". This will display an icon on your Avant Window Navigator dock which you can then click to temporarily disable/enable the notifications.


How to test the notifications


When you configure the AWN Notification Daemon notifications, you'll want to see how they look. You can send a test notification by using "notify-send". To use it, install the following package:
sudo apt-get install libnotify-bin

Then copy/paste the following command in a terminal (this is the command I've used for the screenshot in this post, you can tweak it any way you want):
notify-send --icon="chromium" "Notification title" "Test notification - body text"



Want the regular NotifyOSD notifications back? Simply remove the applet from Avant Window Navigator.

CloudSN (Cloud Services Notifications) Update Finally Brings Twitter OAuth Support

Cloudsn

CloudSN (Cloud Services Notifications) is an application you can use to display notifications when you have new emails (POP3 and IMAP), new Identi.ca messages, Google Reader unread items or it can watch any RSS feed for changes (which means you can use it for Facebook too). For a complete review, see our previous post on CloudSN.

Back when Twitter introduced OAuth for all applications, CloudSN stopped working with Twitter but an update finally brings Twitter OAuth support for CloudSN.


CloudSN notification

The new version is available in the CloudSN PPA for Ubuntu 10.10 Maverick Meerkat (only!) - add the PPA and install CloudSN using the following commands:

sudo add-apt-repository ppa:chuchiperriman/cloudsn
sudo apt-get update
sudo apt-get install cloudsn


Once installed, run it from Applications > Internet > Cloud Services Notifications.

Get Facebook Notifications In Conky [Script]

Conky facebook

Conky is simply amazing - with the help of basic scripts you can get it to display any info on your desktop. Here is how to get Conky to display Facebook notifications.


1. Create a new file called "facebook" somewhere on your home folder. I usually store these scripts in a "scripts" folder. Then paste the following code inside the newly created file:

#!/bin/bash
numberoflines=5
address="REPLACE_WITH_YOUR_FACEBOOK_NOTIFICATIONS_LINK"
wget --user-agent="Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.55 Safari/533.4" -q $address -O /tmp/fbrss
cat /tmp/fbrss | awk '{
gsub(/.*<description>|<\/description>.*/,"")
print }' | grep "<title>" | cut -d"<" -f2 | cut -d">" -f2 | awk '{
gsub(/&apos;s/, "");
gsub(/&quot;/, "\"");
gsub(/commented on/, ">");
gsub(/also/, "");
gsub(/your friend request/, "friendship");
gsub(/posted something on/, "-->");
gsub(/posted on/, "-->");
print }' | awk '{
if ($0 in stored_lines)
x=1
else
print
stored_lines[$0]=1
}'| tail -n +2 | head -n $numberoflines
rm -f /tmp/fbrss*

The "numberoflines" variable is the number of Facebook notifications that will show up in Conky - you can modify it to whatever you want.


2. Go to your Facebook notifications page (click here) and somewhere near the top you should see a link called "Via RSS" - copy the link and replace "REPLACE_WITH_YOUR_FACEBOOK_NOTIFICATIONS_LINK" in the above script with this link.

Facebook notifications RSS feed




3. Make the script executable. If you've placed the script under ~/scripts/facebook, run this command:
chmod +x ~/scripts/facebook

4. Open your .conkyrc file and paste the following code where you want to get the Facebook notifications:
${if_existing /proc/net/route eth0}${font Ubuntu:size=8}${color4}Facebook Notifications: ${color}
$stippled_hr
${voffset -2}${font Ubuntu:size=7}${color1}${execi 60 ~/scripts/facebook}${color white}
${endif}

Make sure you replace "~/scripts/facebook" with the exact path to where you've saved the script in step 1. Also, you can of course customize the font in the above code.


Now simply save the .conkyrc file and start conky.


See also:




Many thanks to DiggingLinux for the script and tip!
 
Support By Blogger