View Single Post
Posts: 12 | Thanked: 28 times | Joined on Jan 2010
#33
I'm finished Ma!

Sourcecode at:
http://lumiera.org/maemo_notify.c

The plugin at:
http://lumiera.org/maemo_notify.so

How to use it

Put the maemo_notify.so into your ~/.xchat2/ dir. Maybe write a maemo_notify.conf file there (using the commands below without the leading /, untested).
Defaults are full blown and work for me so i didn't test the config file thing.

The plugin adds some new commands:
First some raw stuff, for use in scripts, you likely never need that directly

/LED_ACTIVATE <pattern>
enables a led blinking pattern
/LED_CANCEL <pattern>
disables a led blinking pattern
/VIBRA_ACTIVATE <pattern>
enables a vibration pattern
/VIBRA_CANCEL <pattern>
disables a vibration pattern
/MAEMO_BANNER <message...>
shows a message for a short while
/MAEMO_DIALOG <message...>
shows a messages which must be acknowledged (tapped)

Then the configuration primitives, this is what you likely want to use:

/LED_PATTERN [pattern]
set or show the led pattern for notifications, see /etc/msc/mce.ini for possible values or configure your own.
/VIBRA_PATTERN [pattern]
set or show the vibrator pattern for notifications
/NOTIFY_MODE [+/-flags]
set notification flags, l=LED, v=Vibrator, b=Banner, d=Dialog, example: '/notify_mode +b-v+l-d' turns banners and led on, dialogs and vibrator off.

Things act only when it makes sense (YMMV, maybe someone wants to make this configureable), that is:
Notification LED and Vibrator act only when the display is not on. Banners and Dialogs are only shown when xchat has no focus, banners are only shown when the display is on and we don't show a dialog.

For me this is now in a 'useable' state, if anyone wants to hack further on it, feel free to improve it.

Christian
 

The Following 6 Users Say Thank You to cehteh For This Useful Post: