maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   New XChat build available (https://talk.maemo.org/showthread.php?t=38927)

ToJa92 2010-02-18 18:36

Re: New XChat build available
 
Quote:

Originally Posted by cehteh (Post 534958)
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?

cehteh 2010-02-18 19:26

Re: New XChat build available
 
Quote:

Originally Posted by ToJa92 (Post 534974)
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.

cehteh 2010-02-19 00:28

Re: New XChat build available
 
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

fms 2010-02-19 06:00

Re: New XChat build available
 
Thanks, cehteh, will roll it into the next XChat release, if everything works.

cehteh 2010-02-19 16:03

Re: New XChat build available
 
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

fms 2010-02-21 13:06

Re: New XChat build available
 
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.

fms 2010-02-23 07:32

Re: New XChat build available
 
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/

SirMuttley 2010-02-25 10:55

Re: New XChat build available
 
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?

fwrnando 2010-02-25 17:31

Re: New XChat build available
 
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)

fms 2010-02-25 18:47

Re: New XChat build available
 
Quote:

Originally Posted by fwrnando (Post 546190)
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


All times are GMT. The time now is 08:59.

vBulletin® Version 3.8.8