X-Git-Url: https://disinclined.org/git/?a=blobdiff_plain;f=listen.c;h=4c8eef70e4877496b35667362c70f1826783ba2e;hb=121a2e536358653d9804904a13dd1f4ecc88acdc;hp=527d737b0c5d2c9a76e261fa92069e92cfc03849;hpb=ce0a286aa6dda90e1a8db3f8cba03b46b2f7e439;p=irssi-notify.git diff --git a/listen.c b/listen.c index 527d737..4c8eef7 100644 --- a/listen.c +++ b/listen.c @@ -10,6 +10,7 @@ #include #include #include +#include #define PORT "3490" // the port users will be connecting to @@ -124,13 +125,10 @@ int main(void) } buf[4096] = '\0'; printf("irssi-notify: recieved '%s'\n", buf); - if (!fork()){ - setenv("DISPLAY", ":0", 1); // doesn't seem to be doing the trick - execlp("notify-display", - "notify-display", buf, NULL); - // the first argument to execl is the command, the second is the first argument - // passed to the program ($0), customarily the evocation of the command - } + notify_init("irssi-notify"); + NotifyNotification * notification = + notify_notification_new("", buf, "irssi-notify"); + notify_notification_show(notification, NULL); close(activefd); exit(0); }