about summary refs log tree commit diff stats
Commit message (Expand)AuthorAgeFilesLines
* prepared 0.8 0.8Anselm R.Garbe2006-08-102-2/+3
* updated htmlAnselm R.Garbe2006-08-101-2/+2
* fixed the issue reported by sander (gaps at left columns button due to round-...Anselm R.Garbe2006-08-101-1/+4
* applied sumik's multihead patchAnselm R.Garbe2006-08-103-6/+13
* applied sander's patchAnselm R.Garbe2006-08-102-14/+18
* readded border color, this sucks leastAnselm R.Garbe2006-08-105-14/+26
* drawing border with fg colorAnselm R.Garbe2006-08-101-1/+14
* removed unnecessary border colorAnselm R.Garbe2006-08-105-25/+0
* swapping my default colors (bg with fg)Anselm R.Garbe2006-08-101-2/+2
* made terminals darker, that is better indeedAnselm R.Garbe2006-08-101-1/+1
* disallow zoom on maximized clientsAnselm R.Garbe2006-08-104-21/+8
* added zoom on Mod1-Button1 on managed clients only (there is no moving possible)Anselm R.Garbe2006-08-091-0/+2
* removed NET_ACTIVE_WINDOW handlingAnselm R.Garbe2006-08-084-20/+1
* implemented NET_ACTIVE_WINDOW supportAnselm R.Garbe2006-08-084-1/+20
* fixed typoAnselm R.Garbe2006-08-081-1/+1
* it always takes a while until one sticks to a colorscheme, but this one feels...Anselm R.Garbe2006-08-081-1/+1
* default colors are bestAnselm R.Garbe2006-08-081-3/+3
* without borders it looks cleanerAnselm R.Garbe2006-08-081-2/+2
* red is easier to my eyes with ffffaa bgAnselm R.Garbe2006-08-081-2/+2
* using a better colorscheme (ffffaa is the best background for black)Anselm R.Garbe2006-08-081-2/+2
* applied Sanders tiny patchesAnselm R.Garbe2006-08-084-7/+8
* removed some "arg@10ksloc.org2006-08-071-4/+4
* I really only need 3 tagsarg@10ksloc.org2006-08-071-17/+11
* added a trailing '.' to shortcut descriptions in dwm(1)arg@10ksloc.org2006-08-071-15/+15
* changed signature of drawtextarg@10ksloc.org2006-08-071-12/+10
* applied grabbing-- and shell_minimalarg@10ksloc.org2006-08-072-9/+1
* updated screenshot sectionarg@10ksloc.org2006-08-071-1/+2
* changed font size, I'm not blind...arg@10ksloc.org2006-08-071-2/+2
* small fix of a commentarg@10ksloc.org2006-08-071-1/+1
* typo fixarg@10ksloc.org2006-08-071-1/+1
* applied Sanders man page/Makefile patcharg@10ksloc.org2006-08-072-2/+2
* settle with greyarg@10ksloc.org2006-08-071-2/+2
* next version is 0.8arg@10ksloc.org2006-08-071-1/+1
* made my colors tasting better with the backgroundarg@10ksloc.org2006-08-071-3/+3
* status box should have a border in my eyesarg@10ksloc.org2006-08-072-2/+2
* next attempt for w on black switcharg@10ksloc.org2006-08-071-4/+4
* Added tag 0.7 for changeset 3fb41412e2492f66476d92ce8f007a8b48fb1d2aarg@10ksloc.org2006-08-071-0/+1
* prepared dwm.html 0.7arg@10ksloc.org2006-08-071-3/+6
* added stripping to dwm target in Makefilearg@10ksloc.org2006-08-071-0/+1
* changed getproto, maybe that might fix the killclient issue reported on the listarg@10ksloc.org2006-08-071-2/+3
* applied endless loop prevention on zoom()arg@10ksloc.org2006-08-071-1/+3
* updated man pagearg@10ksloc.org2006-08-071-0/+2
* small fix of the last commitarg@10ksloc.org2006-08-051-1/+1
* using -Os again, zoom is ignored in floating mode or on floating clientsarg@10ksloc.org2006-08-052-2/+2
* mouse grab needs also to grab for combinations of numlock/lockmaskarg@10ksloc.org2006-08-051-0/+20
* slight fixarg@10ksloc.org2006-08-051-3/+2
* small performance tweak ;)arg@10ksloc.org2006-08-041-2/+4
* fixed xterm font change (all other related apps should work fine with this fi...arg@10ksloc.org2006-08-041-14/+12
* fixed view-change bug reported on the listarg@10ksloc.org2006-08-041-14/+10
* no need for -g anymore, regexp matching works nowarg@10ksloc.org2006-08-041-4/+4
span class="o">&r, 1); if(!text) return; w = 0; olen = len = strlen(text); if(len >= sizeof(buf)) len = sizeof(buf) - 1; memcpy(buf, text, len); buf[len] = 0; h = dc.font.ascent + dc.font.descent; y = dc.y + (dc.h / 2) - (h / 2) + dc.font.ascent; x = dc.x + (h / 2); /* shorten text if necessary */ while(len && (w = textnw(buf, len)) > dc.w - h) buf[--len] = 0; if(len < olen) { if(len > 1) buf[len - 1] = '.'; if(len > 2) buf[len - 2] = '.'; if(len > 3) buf[len - 3] = '.'; } if(w > dc.w) return; /* too long */ gcv.foreground = col[ColFG]; if(dc.font.set) { XChangeGC(dpy, dc.gc, GCForeground, &gcv); XmbDrawString(dpy, dc.drawable, dc.font.set, dc.gc, x, y, buf, len); } else { gcv.font = dc.font.xfont->fid; XChangeGC(dpy, dc.gc, GCForeground | GCFont, &gcv); XDrawString(dpy, dc.drawable, dc.gc, x, y, buf, len); } if(highlight) { r.x = dc.x + 2; r.y = dc.y + 2; r.width = r.height = 3; XFillRectangles(dpy, dc.drawable, dc.gc, &r, 1); } } /* extern */ void drawall() { Client *c; for(c = clients; c; c = getnext(c->next)) drawtitle(c); drawstatus(); } void drawstatus() { static const char *mode[] = { "~", "|" }; int i, x; dc.x = dc.y = 0; dc.w = bw; if(!modew) modew = textw(mode[0]) > textw(mode[1]) ? textw(mode[0]) : textw(mode[1]); drawtext(mode[arrange == dotile ? 1 : 0], dc.status, False); dc.w = 0; dc.x = modew; for(i = 0; i < ntags; i++) { dc.x += dc.w; dc.w = textw(tags[i]); if(seltag[i]) drawtext(tags[i], dc.sel, sel && sel->tags[i]); else drawtext(tags[i], dc.norm, sel && sel->tags[i]); } x = dc.x + dc.w + 1; dc.w = textw(stext); dc.x = bx + bw - dc.w; if(dc.x < x) { dc.x = x; dc.w = bw - x; } drawtext(stext, dc.status, False); if(sel && ((dc.w = dc.x - x) > bh)) { dc.x = x; drawtext(sel->name, dc.sel, False); } XCopyArea(dpy, dc.drawable, barwin, dc.gc, 0, 0, bw, bh, 0, 0); XSync(dpy, False); } void drawtitle(Client *c) { int i; if(c == sel && issel) { drawstatus(); XUnmapWindow(dpy, c->twin); XSetWindowBorder(dpy, c->win, dc.sel[ColBG]); return; } XSetWindowBorder(dpy, c->win, dc.norm[ColBG]); XMapWindow(dpy, c->twin); dc.x = dc.y = 0; dc.w = c->tw; drawtext(c->name, dc.norm, False); XCopyArea(dpy, dc.drawable, c->twin, dc.gc, 0, 0, c->tw, c->th, 0, 0); XSync(dpy, False); } unsigned long getcolor(const char *colstr) { Colormap cmap = DefaultColormap(dpy, screen); XColor color; XAllocNamedColor(dpy, cmap, colstr, &color, &color); return color.pixel; } void setfont(const char *fontstr) { char **missing, *def; int i, n; missing = NULL; setlocale(LC_ALL, ""); if(dc.font.set) XFreeFontSet(dpy, dc.font.set); dc.font.set = XCreateFontSet(dpy, fontstr, &missing, &n, &def); if(missing) { while(n--) fprintf(stderr, "missing fontset: %s\n", missing[n]); XFreeStringList(missing); if(dc.font.set) { XFreeFontSet(dpy, dc.font.set); dc.font.set = NULL; } } if(dc.font.set) { XFontSetExtents *font_extents; XFontStruct **xfonts; char **font_names; dc.font.ascent = dc.font.descent = 0; font_extents = XExtentsOfFontSet(dc.font.set); n = XFontsOfFontSet(dc.font.set, &xfonts, &font_names); for(i = 0, dc.font.ascent = 0, dc.font.descent = 0; i < n; i++) { if(dc.font.ascent < (*xfonts)->ascent) dc.font.ascent = (*xfonts)->ascent; if(dc.font.descent < (*xfonts)->descent) dc.font.descent = (*xfonts)->descent; xfonts++; } } else { if(dc.font.xfont) XFreeFont(dpy, dc.font.xfont); dc.font.xfont = NULL; dc.font.xfont = XLoadQueryFont(dpy, fontstr); if (!dc.font.xfont) dc.font.xfont = XLoadQueryFont(dpy, "fixed"); if (!dc.font.xfont) eprint("error, cannot init 'fixed' font\n"); dc.font.ascent = dc.font.xfont->ascent; dc.font.descent = dc.font.xfont->descent; } dc.font.height = dc.font.ascent + dc.font.descent; } unsigned int textw(const char *text) { return textnw(text, strlen(text)) + dc.font.height; }