Water effet notification + sound (pidgin / amule / ...)

Moderators: digital, horus

Water effet notification + sound (pidgin / amule / ...)

Postby analyzer on 05 Jul 2008, 02:11

First of all in Sound Panel of Pidgins Preferences, which available under tools menu, select the sound method as *command*.

Then put "/path/waterEffect.sh pidgin %s" in the editbox.

waterEffect script:
Code: Select all
#!/bin/bash
#waterEffect
#
#USAGE: waterEffect IconName SoundNotification
#

#Panel layout - Top || Bottom || Left || Right
LAYOUT="Top"

# Get active window id
focus=$(xprop -root | grep "_NET_ACTIVE_WINDOW(WINDOW)" | cut -c 40-)
info=`xprop -id $focus | grep WM_CLASS | cut -c 20-`

# If pidgin isn't the focused window, then ripple !
if !(echo "$info" | grep -qiw "$1"); then

        WINFO=`xwininfo -root -tree -name "$LAYOUT Panel"| 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

        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:$WAX string:'y' int32:$WAY
fi

[ $# -eq 2 ] && [ -r $2 ] && aplay -q $2


Now the ripple effect + sound notification is working with pidgin, have fun !
(this can be used on amule as well)
analyzer
Administrateur
Administrateur
 
Posts: 27
Joined: 22 Mar 2005, 19:37

Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron