X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=main.c;h=0727c2ab563afb80ef5d8a07102acf8caa6be189;hb=f1fe19bc2b0b1744a82551ef2580e621231cd97e;hp=6544e9ce02c594c25e2c5f567ae793818bf1171b;hpb=b5159dfd2f552696b049b95e0d368a2c33a1002a;p=dwm.git diff --git a/main.c b/main.c index 6544e9c..0727c2a 100644 --- a/main.c +++ b/main.c @@ -20,7 +20,7 @@ char stext[1024]; Bool *seltag; int screen, sx, sy, sw, sh, bx, by, bw, bh, mw; -unsigned int ntags, numlockmask; +unsigned int ntags, numlockmask, modew; Atom wmatom[WMLast], netatom[NetLast]; Bool running = True; Bool issel = True; @@ -121,11 +121,15 @@ setup() seltag[0] = True; /* style */ - dc.bg = getcolor(BGCOLOR); - dc.fg = getcolor(FGCOLOR); - dc.border = getcolor(BORDERCOLOR); + dc.norm[ColBG] = getcolor(NORMBGCOLOR); + dc.norm[ColFG] = getcolor(NORMFGCOLOR); + dc.sel[ColBG] = getcolor(SELBGCOLOR); + dc.sel[ColFG] = getcolor(SELFGCOLOR); + dc.status[ColBG] = getcolor(STATUSBGCOLOR); + dc.status[ColFG] = getcolor(STATUSFGCOLOR); setfont(FONT); + modew = 0; sx = sy = 0; sw = DisplayWidth(dpy, screen); sh = DisplayHeight(dpy, screen); @@ -133,7 +137,7 @@ setup() bx = by = 0; bw = sw; - dc.h = bh = dc.font.height + 4; + dc.h = bh = dc.font.height + 2; wa.override_redirect = 1; wa.background_pixmap = ParentRelative; wa.event_mask = ButtonPressMask | ExposureMask; @@ -145,9 +149,9 @@ setup() dc.drawable = XCreatePixmap(dpy, root, sw, bh, DefaultDepth(dpy, screen)); dc.gc = XCreateGC(dpy, root, 0, 0); + XSetLineAttributes(dpy, dc.gc, 1, LineSolid, CapButt, JoinMiter); issel = XQueryPointer(dpy, root, &w, &w, &i, &i, &i, &i, &mask); - strcpy(stext, "dwm-"VERSION); }