dwm-meillo
changeset 143:36cabfe408cd
applied Sanders patches
author | arg@10ksloc.org |
---|---|
date | Tue, 01 Aug 2006 12:32:33 +0200 |
parents | 9b9deafa0508 |
children | e61447a7f249 |
files | Makefile README client.c config.mk dwm.1 dwm.h event.c tag.c |
diffstat | 8 files changed, 43 insertions(+), 59 deletions(-) [+] |
line diff
1.1 --- a/Makefile Tue Aug 01 11:49:19 2006 +0200 1.2 +++ b/Makefile Tue Aug 01 12:32:33 2006 +0200 1.3 @@ -13,7 +13,6 @@ 1.4 1.5 options: 1.6 @echo dwm build options: 1.7 - @echo "LIBS = ${LIBS}" 1.8 @echo "CFLAGS = ${CFLAGS}" 1.9 @echo "LDFLAGS = ${LDFLAGS}" 1.10 @echo "CC = ${CC}" 1.11 @@ -29,7 +28,7 @@ 1.12 @${CC} -o $@ ${OBJ} ${LDFLAGS} 1.13 1.14 clean: 1.15 - rm -f dwm *.o core dwm-${VERSION}.tar.gz 1.16 + rm -f dwm *.o dwm-${VERSION}.tar.gz 1.17 1.18 dist: clean 1.19 mkdir -p dwm-${VERSION}
2.1 --- a/README Tue Aug 01 11:49:19 2006 +0200 2.2 +++ b/README Tue Aug 01 12:32:33 2006 +0200 2.3 @@ -1,6 +1,6 @@ 2.4 dwm - dynamic window manager 2.5 ---------------------------- 2.6 -dwm is an extremly fast, small, and dynamic X11 window manager. 2.7 +dwm is an extremely fast, small, and dynamic X11 window manager. 2.8 2.9 2.10 Requirements 2.11 @@ -10,8 +10,8 @@ 2.12 2.13 Installation 2.14 ------------ 2.15 -Edit config.mk to match your local setup. dwm is installed into 2.16 -the /usr/local namespace by default. 2.17 +Edit config.mk to match your local setup (dwm is installed into 2.18 +the /usr/local namespace by default). 2.19 2.20 Afterwards enter the following command to build and install dwm (if 2.21 necessary as root): 2.22 @@ -35,16 +35,17 @@ 2.23 2.24 Displaying status info 2.25 ---------------------- 2.26 -In order to display status info in the bar, you can do following 2.27 -in .xinitrc: 2.28 +In order to display status info in the bar, you can do something 2.29 +like this in your .xinitrc: 2.30 2.31 while true 2.32 do 2.33 echo `date` `uptime | sed 's/.*://; s/,//g'` 2.34 - sleep 2 2.35 + sleep 1 2.36 done | dwm 2.37 2.38 + 2.39 Configuration 2.40 ------------- 2.41 -The configuration of dwm is done by customizing source code, 2.42 -grep for CUSTOMIZE keyword. 2.43 +The configuration of dwm is done by customizing its source code 2.44 +(grep for the CUSTOMIZE keyword).
3.1 --- a/client.c Tue Aug 01 11:49:19 2006 +0200 3.2 +++ b/client.c Tue Aug 01 12:32:33 2006 +0200 3.3 @@ -244,11 +244,11 @@ 3.4 c->next = clients; 3.5 clients = c; 3.6 3.7 - XGrabButton(dpy, Button1, MODKEY, c->win, False, ButtonPressMask, 3.8 + XGrabButton(dpy, Button1, MODKEY, c->win, False, ButtonMask, 3.9 GrabModeAsync, GrabModeSync, None, None); 3.10 - XGrabButton(dpy, Button2, MODKEY, c->win, False, ButtonPressMask, 3.11 + XGrabButton(dpy, Button2, MODKEY, c->win, False, ButtonMask, 3.12 GrabModeAsync, GrabModeSync, None, None); 3.13 - XGrabButton(dpy, Button3, MODKEY, c->win, False, ButtonPressMask, 3.14 + XGrabButton(dpy, Button3, MODKEY, c->win, False, ButtonMask, 3.15 GrabModeAsync, GrabModeSync, None, None); 3.16 3.17 if(!c->isfloat)
4.1 --- a/config.mk Tue Aug 01 11:49:19 2006 +0200 4.2 +++ b/config.mk Tue Aug 01 12:32:33 2006 +0200 4.3 @@ -7,24 +7,18 @@ 4.4 X11INC = /usr/X11R6/include 4.5 X11LIB = /usr/X11R6/lib 4.6 4.7 -VERSION = 0.5 4.8 +# includes and libs 4.9 +INCS = -I/usr/lib -I${X11INC} 4.10 +LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 4.11 4.12 -# includes and libs 4.13 -LIBS = -L${PREFIX}/lib -L/usr/lib -lc -L${X11LIB} -lX11 4.14 - 4.15 -# Linux/BSD 4.16 -CFLAGS = -O3 -I. -I${PREFIX}/include -I/usr/include -I${X11INC} \ 4.17 - -DVERSION=\"${VERSION}\" 4.18 +# flags 4.19 +CFLAGS = -O3 ${INCS} -DVERSION=\"${VERSION}\" 4.20 LDFLAGS = ${LIBS} 4.21 -#CFLAGS = -g -Wall -O2 -I. -I${PREFIX}/include -I/usr/include -I${X11INC} \ 4.22 -# -DVERSION=\"${VERSION}\" 4.23 +#CFLAGS = -g -Wall -O2 ${INCS} -DVERSION=\"${VERSION}\" 4.24 #LDFLAGS = -g ${LIBS} 4.25 4.26 +# compiler 4.27 +CC = cc 4.28 4.29 -# Solaris 4.30 -#CFLAGS = -fast -xtarget=ultra ${INCLUDES} -DVERSION=\"${VERSION}\" 4.31 -#LIBS += -lnsl -lsocket 4.32 - 4.33 -AR = ar cr 4.34 -CC = cc 4.35 -RANLIB = ranlib 4.36 +# dwm version 4.37 +VERSION = 0.6
5.1 --- a/dwm.1 Tue Aug 01 11:49:19 2006 +0200 5.2 +++ b/dwm.1 Tue Aug 01 12:32:33 2006 +0200 5.3 @@ -21,7 +21,7 @@ 5.4 several views. 5.5 .P 5.6 .B dwm 5.7 -consists of a small status bar which reads the text displayed from standard 5.8 +has a small status bar which reads the text displayed from standard 5.9 input, if written. It draws 1-pixel borders around windows to indicate the 5.10 focus state. Unfocused windows contain a small bar in front of the window 5.11 displaying the tags and the window title. 5.12 @@ -56,14 +56,12 @@ 5.13 tag 5.14 .TP 5.15 .B Mod1-space 5.16 -(Re-)arrange 5.17 -.B all 5.18 -windows tiled 5.19 -.TP 5.20 -.B Mod1-Shift-space 5.21 -(Re-)arrange 5.22 -.B all 5.23 -windows floating 5.24 +Toggle between 5.25 +.B tiled 5.26 +and 5.27 +.B floating 5.28 +mode (affects 5.29 +.BR "all windows" ) 5.30 .TP 5.31 .B Mod1-Shift-[0..n] 5.32 Apply 5.33 @@ -79,14 +77,6 @@ 5.34 Start 5.35 .B terminal 5.36 .TP 5.37 -.B Mod1-Shift-w 5.38 -Start 5.39 -.B web browser 5.40 -.TP 5.41 -.B Mod1-Shift-l 5.42 -Lock 5.43 -.B screen 5.44 -.TP 5.45 .B Mod1-Control-[0..n] 5.46 Append 5.47 .B nth
6.1 --- a/dwm.h Tue Aug 01 11:49:19 2006 +0200 6.2 +++ b/dwm.h Tue Aug 01 12:32:33 2006 +0200 6.3 @@ -25,9 +25,12 @@ 6.4 6.5 /* END CUSTOMIZE */ 6.6 6.7 +/* mask shorthands, used in event.c and client.c */ 6.8 +#define ButtonMask (ButtonPressMask | ButtonReleaseMask) 6.9 +#define MouseMask (ButtonMask | PointerMotionMask) 6.10 + 6.11 typedef union Arg Arg; 6.12 typedef struct Client Client; 6.13 -typedef enum Corner Corner; 6.14 typedef struct DC DC; 6.15 typedef struct Fnt Fnt; 6.16 6.17 @@ -43,7 +46,8 @@ 6.18 /* cursor */ 6.19 enum { CurNormal, CurResize, CurMove, CurLast }; 6.20 6.21 -enum Corner { TopLeft, TopRight, BotLeft, BotRight }; 6.22 +/* windowcorners */ 6.23 +typedef enum { TopLeft, TopRight, BotLeft, BotRight } Corner; 6.24 6.25 struct Fnt { 6.26 int ascent;
7.1 --- a/event.c Tue Aug 01 11:49:19 2006 +0200 7.2 +++ b/event.c Tue Aug 01 12:32:33 2006 +0200 7.3 @@ -8,9 +8,6 @@ 7.4 #include <X11/keysym.h> 7.5 #include <X11/Xatom.h> 7.6 7.7 -#define ButtonMask (ButtonPressMask | ButtonReleaseMask) 7.8 -#define MouseMask (ButtonMask | PointerMotionMask) 7.9 - 7.10 /* CUSTOMIZE */ 7.11 7.12 typedef struct { 7.13 @@ -20,17 +17,13 @@ 7.14 Arg arg; 7.15 } Key; 7.16 7.17 -/* 7.18 const char *browse[] = { "firefox", NULL }; 7.19 const char *gimp[] = { "gimp", NULL }; 7.20 -*/ 7.21 -const char *term[] = { "xterm", NULL }; 7.22 -/* 7.23 +const char *term[] = { /*"xterm", NULL };*/ 7.24 "urxvt", "-tr", "+sb", "-bg", "black", "-fg", "white", "-cr", "white", 7.25 "-fn", "-*-terminus-medium-*-*-*-13-*-*-*-*-*-iso10646-*", NULL 7.26 }; 7.27 const char *xlock[] = { "xlock", NULL }; 7.28 -*/ 7.29 7.30 static Key key[] = { 7.31 /* modifier key function arguments */ 7.32 @@ -57,11 +50,9 @@ 7.33 { MODKEY|ShiftMask, XK_c, killclient, { 0 } }, 7.34 { MODKEY|ShiftMask, XK_q, quit, { 0 } }, 7.35 { MODKEY|ShiftMask, XK_Return, spawn, { .argv = term } }, 7.36 - /* 7.37 { MODKEY|ShiftMask, XK_g, spawn, { .argv = gimp } }, 7.38 { MODKEY|ShiftMask, XK_l, spawn, { .argv = xlock } }, 7.39 { MODKEY|ShiftMask, XK_w, spawn, { .argv = browse } }, 7.40 - */ 7.41 }; 7.42 7.43 /* END CUSTOMIZE */ 7.44 @@ -172,6 +163,7 @@ 7.45 } 7.46 } 7.47 else if((c = getclient(ev->window))) { 7.48 + focus(c); 7.49 switch(ev->button) { 7.50 default: 7.51 break; 7.52 @@ -247,7 +239,7 @@ 7.53 Client *c; 7.54 XCrossingEvent *ev = &e->xcrossing; 7.55 7.56 - if(ev->mode != NotifyNormal || ev->detail == NotifyInferior) 7.57 + if(ev->detail == NotifyInferior) 7.58 return; 7.59 7.60 if((c = getclient(ev->window)))
8.1 --- a/tag.c Tue Aug 01 11:49:19 2006 +0200 8.2 +++ b/tag.c Tue Aug 01 12:32:33 2006 +0200 8.3 @@ -67,6 +67,8 @@ 8.4 higher(sel); 8.5 focus(sel); 8.6 } 8.7 + else 8.8 + XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime); 8.9 } 8.10 drawall(); 8.11 } 8.12 @@ -130,6 +132,8 @@ 8.13 higher(sel); 8.14 focus(sel); 8.15 } 8.16 + else 8.17 + XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime); 8.18 } 8.19 drawall(); 8.20 }