Fremantle versions pushed to Extras
[easy-deb-chroot] / fremantle / easy-deb-chroot / src / home / user / img-install / msgnotify
diff --git a/fremantle/easy-deb-chroot/src/home/user/img-install/msgnotify b/fremantle/easy-deb-chroot/src/home/user/img-install/msgnotify
new file mode 100755 (executable)
index 0000000..a064d2d
--- /dev/null
@@ -0,0 +1,21 @@
+#!/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=$1
+#sound_file=/usr/share/sounds/chat-msg_in_bg.wav
+#sound_file=/usr/share/sounds/Message1.aac
+
+#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