diff --git a/tools/notify-send.c b/tools/notify-send.c index bac4d0c..42df2f8 100644 --- a/tools/notify-send.c +++ b/tools/notify-send.c @@ -59,12 +59,6 @@ main(int argc, const char **argv) POPT_TABLEEND }; - if (!notify_init("notify-send")) - { - fprintf(stderr, "Unable to initialize libnotify\n"); - exit(1); - } - opt_ctx = poptGetContext("notify-send", argc, argv, options, 0); poptSetOtherOptionHelp(opt_ctx, "[OPTIONS]* [description]"); @@ -127,6 +121,12 @@ main(int argc, const char **argv) } } + if (!notify_init("notify-send")) + { + fprintf(stderr, "Unable to initialize libnotify\n"); + exit(1); + } + notify_send_notification(urgency, summary, description, icon, time(NULL) + timeout, timeout_time, NULL, 0);