Water ripple notification for Pidgin

Write tutorials for Linux Mint here
More tutorials on https://github.com/orgs/linuxmint/discu ... /tutorials and (archive) on https://community.linuxmint.com/tutorial
Forum rules
Don't add support questions to tutorials; start your own topic in the appropriate sub-forum instead. Before you post read forum rules
Post Reply
cmost
Level 4
Level 4
Posts: 416
Joined: Tue Sep 18, 2007 7:36 am
Location: Newport, Kentucky

Water ripple notification for Pidgin

Post by cmost »

Here's an oldie but a goodie I've used since Beryl. Recently, when I finally changed over to Compiz-Fusion on Celena, I discovered that my scripts to enable this no longer worked. After some searching, I figured out how to fix them and I thought I would share them with other Linux Mint users.

What this will do is cause a water droplet to serenely ripple across your screen when a buddy signs on or off Pidgin Internet Messenger. It's quite striking (and far less obnoxious than some of the sound effects.) Ready? Let's go.

Prerequisites: 1. You must have Compiz-Fusion installed and running. 2. You must be using a graphics card that supports the 'Water' effect. 3. You must have said water effect and the DBUS plugins enabled in the Compiz Configuration Manager (or Advanced visual effects if in Daryna.) Hopefully I didn't forget anything.

A. First, you will need to create some scripts. There are two: To do this, simply open gedit and copy and paste the lines for each script. Save the script with the name indicated.

1. waterping.sh
#!/bin/bash
#./waterping.sh 0 0
#If you want to ping the coordinates x0, y0
dbus-send --type=method_call --dest=org.freedesktop.compiz /org/freedesktop/compiz/water/allscreens/point org.freedesktop.compiz.activate string:'root' int32:`xwininfo -root | grep id: | awk '{ print $4 }'` string:'amplitude' double:1 string:'x' int32:$1 string:'y' int32:$2

2. senicon.sh
#!/bin/bash
#requires waterping.sh
WINFO=`xwininfo -root -tree | egrep ' (1[2-9]|2[0-4])x(1[2-9]|2[0-4])\+0\+0' | grep "$1" | cut -d ')' -f 2-`
WIW=`echo $WINFO | cut -d 'x' -f 1`
WIH=`echo $WINFO | cut -d 'x' -f 2 | cut -d '+' -f 1`
WIX=`echo $WINFO | cut -d '+' -f 4`
WIY=`echo $WINFO | cut -d '+' -f 5`
let WAX=WIX+WIW/2
let WAY=WIY+WIH/2
waterping.sh $WAX $WAY 2>/dev/null

B. As root, copy each of the scripts to "/usr/local/bin/" Then, open a root terminal and execute the following two lines:
sudo chmod a+x /usr/local/bin/waterping.sh
sudo chmod a+x /usr/local/bin/senicon.sh

C. Configure Pidgin.
Startup Pidgin; go into the Preferences manager. Under the 'Sounds' tab set the method to 'Command' and type in: "senicon.sh pidgin" (without the quotes.)

Viola! Now you should see a beautiful ripple move across your screen for whatever Pidgin notification events you've specified. (Personally, I'd set it for buddies logging in or out, otherwise it becomes annoying.)

Credits for the Compiz-Fusion port of these Beryl scripts:
*Chema on the Spanish forums for translating the original code for Compiz Fusion
You can see the original video (note original instructions posted with the moview are for Beryl) here:
http://www.youtube.com/watch?v=IcOZMGuieDU

Enjoy! :-)
Guest

Re: Water ripple notification for Pidgin

Post by Guest »

This does seem to work on fresh danrya install? When I run senicon manually "senicon pidgin" i get nothing?? I tested my rain drops with "shift + F9" and that works...Any ideas??
kingtux

Re: Water ripple notification for Pidgin

Post by kingtux »

I can confirm this does not work with latest version of mint(GNOME) version...Any thing I can try?
cmost
Level 4
Level 4
Posts: 416
Joined: Tue Sep 18, 2007 7:36 am
Location: Newport, Kentucky

Re: Water ripple notification for Pidgin

Post by cmost »

It's still working just fine on my setup. I'll investigate and post back. I do know that I had to change some of the scripts to accomodate Compiz versus Beryl. I'll let you know what I find out. Stay tuned.
kingtux

Re: Water ripple notification for Pidgin

Post by kingtux »

Thanks for the reponse....any ideas yet??
everest40

Re: Water ripple notification for Pidgin

Post by everest40 »

hey, thanks for the scripts. They work perfectly with Skype too.
everest40

Re: Water ripple notification for Pidgin

Post by everest40 »

everest40 wrote:hey, thanks for the scripts. They work perfectly with Skype too.
Forgot to mention I'm using Ubuntu, not Mint.
Silent-Hunter

Re: Water ripple notification for Pidgin

Post by Silent-Hunter »

It doesn't work for me. When I try to run senicon.sh in a terminal, I get this:

Code: Select all

sean@TERMINAL-BMRF-9:~$ ./senicon.sh
./senicon.sh: line 8: let: : () 24: syntax error: operand expected (error token is ": () 24")
./senicon.sh: line 9: let: 0 24x24: value too great for base (error token is "24x24")
EDIT: I got it working, but the ripples come from the upper left corner of the screen, instead of the Pidgin icon.
ranyardm

Re: Water ripple notification for Pidgin

Post by ranyardm »

Silent-Hunter wrote:It doesn't work for me. When I try to run senicon.sh in a terminal, I get this:

Code: Select all

sean@TERMINAL-BMRF-9:~$ ./senicon.sh
./senicon.sh: line 8: let: : () 24: syntax error: operand expected (error token is ": () 24")
./senicon.sh: line 9: let: 0 24x24: value too great for base (error token is "24x24")
EDIT: I got it working, but the ripples come from the upper left corner of the screen, instead of the Pidgin icon.
I similarly got the same but you have to specify what app you want the ripples to eminate from - in my case I am using gajim so running

Code: Select all

./senicon.sh gajim
works; for you it would be

Code: Select all

./senicon.sh pidgin
Very cool little notifier I must admit!

ETA: whilst the command works, unfortunately gajim doesn't have a "run app on notify" so I can't use it to notify from gajim :(
--
Martyn
Post Reply

Return to “Tutorials”