View Single Post
Posts: 8 | Thanked: 3 times | Joined on Jan 2010 @ US
#22
Made some more progress in getting this to notify me the way I want. It's not the most elegant solution, but it seems to work pretty well. What I did was create a script that makes the phone vibrate, plays a sound, and makes the led notification blink. Then, in the sound preferences, set the script to be the external sound player. This will kill all your custom event sound settings since the script is not really a sound player, but it will be executed when the beep sound is supposed to play. So if you set up the alerts preferences to play a beep on highlighted messages and / or private messages, etc. the script will run and the phone will vibrate, blink, and play a sound. If the silent profile is set, the sound will not play. Heres my script if anyone's interested:

Code:
#!/bin/sh

#Set the vibration pattern (see /etc/mce/mce.ini)
vibrate_pattern=PatternIncomingMessage

#Set the led pattern (see /etc/mce/mce.ini)
led_pattern=PatternCommunicationIM

#Set the sound file to play
sound_file=/path/to/your/sound/file


#Make the phone vibrate
dbus-send --system --type=method_call --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_vibrator_pattern_activate string:$vibrate_pattern

#Play a sound
aplay -q $sound_file

#Make the led notification light blink
dbus-send --system --type=method_call --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_led_pattern_activate string:$led_pattern
Just save this file to your phone, edit the variables (the sound file variable must be edited, the vibrate pattern and led pattern can be left as is, or you can choose your own from /etc/mce/mce.ini) and set the 'External sound playing program' in the xchat sound preferences to be the script file.

Like I said this isn't a perfect solution, but it will make the phone vibrate and play a sound when someone pm's me, or a highlighted message is received. Now I can carry the phone in my pocket with xchat running and know when someone is trying to reach me.

Oh, and the standard "If this messes up your phone, I'm not responsible" disclaimer applies. I'm pretty sure it's safe, but I am kind of a n00b, so anything could happen :-)
 

The Following 2 Users Say Thank You to MasterPo For This Useful Post: