aewl

changeset 606:44b5617c78b3

and the winner is
author arg@mig29
date Fri, 01 Dec 2006 17:45:27 +0100
parents 755d8dcb8a05
children 16762f7414de
files draw.c dwm.1
diffstat 2 files changed, 20 insertions(+), 14 deletions(-) [+]
line diff
     1.1 --- a/draw.c	Fri Dec 01 17:36:37 2006 +0100
     1.2 +++ b/draw.c	Fri Dec 01 17:45:27 2006 +0100
     1.3 @@ -30,13 +30,13 @@
     1.4  }
     1.5  
     1.6  static void
     1.7 -drawtext(const char *text, unsigned long col[ColLast], Bool dot, Bool corner) {
     1.8 +drawtext(const char *text, unsigned long col[ColLast], Bool filleddot, Bool emptydot) {
     1.9  	int x, y, w, h;
    1.10  	static char buf[256];
    1.11  	unsigned int len, olen;
    1.12  	XGCValues gcv;
    1.13  	XRectangle r = { dc.x, dc.y, dc.w, dc.h };
    1.14 -	XPoint pt[3];
    1.15 +	XPoint pt[5];
    1.16  
    1.17  	XSetForeground(dpy, dc.gc, col[ColBG]);
    1.18  	XFillRectangles(dpy, dc.drawable, dc.gc, &r, 1);
    1.19 @@ -74,20 +74,25 @@
    1.20  		XChangeGC(dpy, dc.gc, GCForeground | GCFont, &gcv);
    1.21  		XDrawString(dpy, dc.drawable, dc.gc, x, y, buf, len);
    1.22  	}
    1.23 -	if(dot) {
    1.24 +	x = (h + 2) / 4;
    1.25 +	if(filleddot) {
    1.26  		r.x = dc.x + 2;
    1.27  		r.y = dc.y + 2;
    1.28 -		r.width = r.height = (h + 2) / 4;
    1.29 +		r.width = r.height = x;
    1.30  		XFillRectangles(dpy, dc.drawable, dc.gc, &r, 1);
    1.31  	}
    1.32 -	if(corner) {
    1.33 -		pt[0].x = dc.x + 1;
    1.34 -		pt[0].y = dc.y + dc.h / 2 + 1;
    1.35 -		pt[1].x = 0;
    1.36 -		pt[1].y = - dc.h / 2;
    1.37 -		pt[2].x = dc.h / 2;
    1.38 -		pt[2].y = 0;
    1.39 -		XDrawLines(dpy, dc.drawable, dc.gc, pt, 3, CoordModePrevious);
    1.40 +	if(emptydot) {
    1.41 +		pt[0].x = dc.x + 2;
    1.42 +		pt[0].y = dc.y + 2;
    1.43 +		pt[1].x = x;
    1.44 +		pt[1].y = 0;
    1.45 +		pt[2].x = 0;
    1.46 +		pt[2].y = x;
    1.47 +		pt[3].x = -x;
    1.48 +		pt[3].y = 0;
    1.49 +		pt[4].x = 0;
    1.50 +		pt[4].y = -x;
    1.51 +		XDrawLines(dpy, dc.drawable, dc.gc, pt, 5, CoordModePrevious);
    1.52  	}
    1.53  }
    1.54  
     2.1 --- a/dwm.1	Fri Dec 01 17:36:37 2006 +0100
     2.2 +++ b/dwm.1	Fri Dec 01 17:45:27 2006 +0100
     2.3 @@ -21,8 +21,9 @@
     2.4  dwm contains a small status bar which displays all available tags, the mode,
     2.5  the title of the focused window, and the text read from standard input. The
     2.6  selected tags are indicated with a different color. The tags of the focused
     2.7 -window are indicated with a small point in the top left corner.  The tags which
     2.8 -are applied to one or more clients are indicated with a top line.
     2.9 +window are indicated with a filled square in the top left corner.  The tags
    2.10 +which are applied to one or more clients are indicated with an empty square in
    2.11 +the top left corner.
    2.12  .P
    2.13  dwm draws a 1-pixel border around windows to indicate the focus state.
    2.14  Unfocused windows contain a small bar in front of them displaying their title.