Commit 2da86256 by Phyks

Use libnotify for bell notifications

See http://artisan.karma-lab.net/ajouter-notification-a-urxvt.
parent 4506d57a
Showing with 14 additions and 3 deletions
......@@ -13,10 +13,12 @@ X11LIB = /usr/X11R6/lib
# includes and libs
INCS = -I. -I/usr/include -I${X11INC} \
`pkg-config --cflags fontconfig` \
`pkg-config --cflags freetype2`
LIBS = -L/usr/lib -lc -L${X11LIB} -lm -lrt -lX11 -lutil -lXext -lXft -lXrender\
`pkg-config --cflags freetype2` \
`pkg-config --cflags gtk+-2.0`
LIBS = -L/usr/lib -lc -L${X11LIB} -lm -lrt -lX11 -lutil -lXext -lXft -lXrender -lnotify \
`pkg-config --libs fontconfig` \
`pkg-config --libs freetype2`
`pkg-config --libs freetype2` \
`pkg-config --libs gtk+-2.0`
# flags
CPPFLAGS = -DVERSION=\"${VERSION}\" -D_XOPEN_SOURCE=600
......
......@@ -30,6 +30,7 @@
#include <X11/XKBlib.h>
#include <fontconfig/fontconfig.h>
#include <wchar.h>
#include <libnotify/notify.h>
#include "arg.h"
......@@ -2598,6 +2599,14 @@ strhandle(void)
redraw();
}
return;
case 777: /* Libnotify bell. */
if (narg > 3 && strcmp(strescseq.args[1], "notify") == 0) {
NotifyNotification *n;
notify_init("st");
n = notify_notification_new(strescseq.args[2], strescseq.args[3], NULL);
notify_notification_show(n, NULL);
return;
}
}
break;
case 'k': /* old title set compatibility */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment