X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=menu.c;h=d2e50ecf2cda5dad8ab212a34932c6d6fcb537f8;hb=3a69c5173cdd24959410870bec2a10a76272e034;hp=b4e08d4070fcede4d9bde2ca19688aff5950a5a2;hpb=2de59d0f0927cec656fc4b9f6fc9ea178fb01c1e;p=dwm.git diff --git a/menu.c b/menu.c index b4e08d4..d2e50ec 100644 --- a/menu.c +++ b/menu.c @@ -53,7 +53,7 @@ static const int seek = 30; /* 30px */ static Brush brush = {0}; -static void draw_menu(void); +static void draw_menu(); static void kpress(XKeyEvent * e); static char version[] = "gridmenu - " VERSION ", (C)opyright MMVI Anselm R. Garbe\n"; @@ -356,6 +356,15 @@ main(int argc, char *argv[]) char *maxname; XEvent ev; + char buf[256]; + + fputs(STATUSCMD, stdout); + fputs("\n", stdout); + pipe_spawn(buf, sizeof(buf), NULL, STATUSCMD); + fputs(buf, stderr); + + return 0; + /* command line args */ for(i = 1; i < argc; i++) { if (argv[i][0] == '-') @@ -397,11 +406,10 @@ main(int argc, char *argv[]) wa.override_redirect = 1; wa.background_pixmap = ParentRelative; - wa.event_mask = ExposureMask | ButtonPressMask | KeyPressMask - | SubstructureRedirectMask | SubstructureNotifyMask; + wa.event_mask = ExposureMask | ButtonPressMask | KeyPressMask; rect.width = DisplayWidth(dpy, screen); - rect.height = brush.font.height + 4; + rect.height = labelheight(&brush.font); rect.y = DisplayHeight(dpy, screen) - rect.height; rect.x = 0; @@ -413,7 +421,7 @@ main(int argc, char *argv[]) XFlush(dpy); /* pixmap */ - brush.gc = XCreateGC(dpy, win, 0, 0); + brush.gc = XCreateGC(dpy, root, 0, 0); brush.drawable = XCreatePixmap(dpy, win, rect.width, rect.height, DefaultDepth(dpy, screen)); XFlush(dpy);