Notices


Reply
Thread Tools
ToJa92's Avatar
Posts: 1,091 | Thanked: 323 times | Joined on Feb 2010 @ ~
#31
Originally Posted by cehteh View Post
it blinks babe!
I just made a first version of a xchat plugin using the maemo notfication gadgets, being able to blink, vibrate, show banners or dialog boxes for highlighted messages, the raw code for review:

http://lumiera.org/maemo_notify.c

compiling is a bit bumpy, basically:
gcc -std=gnu99 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -g -Wall -ldbus-glib-1 -ldbus-1 -lpthread -lgobject-2.0 -lglib-2.0 -Wl,--export-dynamic -Wall -O1 -shared -fPIC maemo_notify.c -o maemo_notify.so

put maemo_notify.so into ~/.xchat2/

cheers
Wow, sounds awesome. Any chance you can provide a compiled version?
 
Posts: 12 | Thanked: 28 times | Joined on Jan 2010
#32
Originally Posted by ToJa92 View Post
Wow, sounds awesome. Any chance you can provide a compiled version?
Quick one:
http://lumiera.org/maemo_notify.so

note that this is quite gued together, many lots of configurability and some feature are not implemented yet.
 
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:
Posts: 1,418 | Thanked: 1,541 times | Joined on Feb 2008
#34
Thanks, cehteh, will roll it into the next XChat release, if everything works.
 
Posts: 12 | Thanked: 28 times | Joined on Jan 2010
#35
Ok, final update for now:

New featues:
includes the channel name in banners and dialog boxes, (unfortunally doubles the nick name for private chats "nick: nick: message", i am too lazy to fix that)

add +c and +p (-c,-p) modes for /NOTIFY_MODE which enables/disables notifications on channel respective private notifications.

add throttling for dialogs, configurable with /DIALOG_THROTTLE which take a maximum parameter of how many dialogs it may present in a row and a recovery time which increases a current counter every soonafter. Defaults are 5 Dialog boxes and 10 minutes recovery time, should be usable out of the box I think.

Christian
 
Posts: 1,418 | Thanked: 1,541 times | Joined on Feb 2008
#36
cehteh, please provide me with the makefile you are using to build your plugin. I need to build it as part of the XChat package.
 
Posts: 1,418 | Thanked: 1,541 times | Joined on Feb 2008
#37
New XChat build available, that includes cehteh's notification plugin. Please, test and vote here:

http://maemo.org/packages/package_in...2.8.6-maemo15/
 
Posts: 99 | Thanked: 75 times | Joined on Nov 2009
#38
Is Xchat compiled with Proxy support? I notice the Preferences lack ability to set your proxy, but I set it up in the xchat.conf file instead. However it can't connect to the proxy, I get:

*Connecting to myproxy.server.com (XXX.XXX.XXX.XXX) port XXXXX
Proxy failed to connect to host (error 3)
Proxy traversal failed

The config was copied directly from my xchat config on my laptop so should work fine.

Any ideas?
 
Posts: 46 | Thanked: 25 times | Joined on Nov 2009 @ Michigan, USA
#39
How do disable the new notify plugin? It works fine, I just don't like having a banner every time I get a private message. Didn't find anything in ~/.xchat2/ (besides a empty .conf)

Last edited by fwrnando; 2010-02-25 at 17:35.
 
Posts: 1,418 | Thanked: 1,541 times | Joined on Feb 2008
#40
Originally Posted by fwrnando View Post
How do disable the new notify plugin? It works fine, I just don't like having a banner every time I get a private message. Didn't find anything in ~/.xchat2/ (besides a empty .conf)
/NOTIFY_MODE -l-v-b-d

or to just disable the banner

/NOTIFY_MODE -b
 
Reply


 
Forum Jump


All times are GMT. The time now is 23:52.