Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script calling plugin/display #33

Open
KoningFloris opened this issue Jan 7, 2013 · 2 comments
Open

Script calling plugin/display #33

KoningFloris opened this issue Jan 7, 2013 · 2 comments

Comments

@KoningFloris
Copy link

Hello Mattn,

First of all, GoL looks great.

I have been looking into making some kind of centralized notification system to funnel notifications into one application, specifically to push them to my android phone. As a first base I decided to use Growl since many applications allow Growl notifications. But, Grow-for-Linux stops after showing the popup. This is where my lousy hacking skills came in. I have altered the balloon display to run a script with every balloon popup. I added the following code to balloon.c to the display_show():

char str[2000];
strcpy (str, "sh /home/floris/script.sh '");
strcat (str, di->ni->title);
strcat (str, "' '");
strcat (str, di->ni->text);
strcat (str, "'");
system(str);

Note that I am a Java programmer by trade and have very limited experience in C. But this does get the job done of having the balloon popup also call the script located at /home/floris/script.sh and it adds as first and second parameter the title and the message.

There must be a way to do this more properly. Maybe even add an option on the gui to select a certain script to execute instead of this hardcoded thing.

@mattn
Copy link
Owner

mattn commented Jan 8, 2013

Currently, gol don't have customizable, or dynamically plugin specifications. for example putting python or LL interfaces.
So I want to add interfaces to gol. If it finished, it will enable to do it for you.

@KoningFloris
Copy link
Author

Sounds very good.

Is there any documentation on how to create a custom popup? I was unable to find any so ended up hacking the balloon.c. I would like it if I could create and add my own popup version instead of overwriting the current balloon one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants