all repos — dwm @ 3af6434085aee75bd90e22aee95419dc0ae0b969

my dwm build

applied Sanders patches (numlock2)
arg@10ksloc.org unknown
Wed, 02 Aug 2006 11:13:32 +0200
commit

3af6434085aee75bd90e22aee95419dc0ae0b969

parent

57871415c16664cce494b68dd3e985bcb32942c5

5 files changed, 40 insertions(+), 26 deletions(-)

jump to
M config.arg.hconfig.arg.h

@@ -3,9 +3,7 @@ * (C)opyright MMVI Anselm R. Garbe <garbeam at gmail dot com>

* See LICENSE file for license details. */ -enum { Tfnord, Tdev, Tnet, Twork, Tmisc, TLast }; #define DEFMODE dotile /* dofloat */ -#define DEFTAG Tdev #define FONT "-*-terminus-medium-*-*-*-13-*-*-*-*-*-iso10646-*" #define BGCOLOR "#0a2c2d" #define FGCOLOR "#ddeeee"

@@ -14,6 +12,7 @@ #define MODKEY Mod1Mask

#define NUMLOCKMASK Mod2Mask #define MASTERW 52 /* percent */ +enum { Tfnord, Tdev, Tnet, Twork, Tmisc, TLast }; #define TAGS \ char *tags[TLast] = { \ [Tfnord] = "fnord", \

@@ -22,6 +21,7 @@ [Tnet] = "net", \

[Twork] = "work", \ [Tmisc] = "misc", \ }; +#define DEFTAG Tdev #define KEYS \ const char *browse[] = { "firefox", NULL }; \
M config.hconfig.h

@@ -3,9 +3,7 @@ * (C)opyright MMVI Anselm R. Garbe <garbeam at gmail dot com>

* See LICENSE file for license details. */ -enum { Tfnord, Tdev, Tnet, Twork, Tmisc, TLast }; #define DEFMODE dotile /* dofloat */ -#define DEFTAG Tdev #define FONT "fixed" #define BGCOLOR "#666699" #define FGCOLOR "#eeeeee"

@@ -14,6 +12,7 @@ #define MODKEY Mod1Mask

#define NUMLOCKMASK Mod2Mask #define MASTERW 52 /* percent */ +enum { Tfnord, Tdev, Tnet, Twork, Tmisc, TLast }; #define TAGS \ char *tags[TLast] = { \ [Tfnord] = "fnord", \

@@ -22,6 +21,7 @@ [Tnet] = "net", \

[Twork] = "work", \ [Tmisc] = "misc", \ }; +#define DEFTAG Tdev #define KEYS \ const char *term[] = { "xterm", NULL }; \
M config.mkconfig.mk

@@ -1,4 +1,10 @@

-# Customize to fit your system +# dwm version +VERSION = 0.6 + +# Customize below to fit your system + +# configheader +CONFIG = config.h # paths PREFIX = /usr/local

@@ -10,12 +16,6 @@

# includes and libs INCS = -I/usr/lib -I${X11INC} LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 - -# dwm version -VERSION = 0.6 - -# default config.h -CONFIG = config.h # flags CFLAGS = -O3 ${INCS} -DVERSION=\"${VERSION}\" -DCONFIG=\"${CONFIG}\"
M dwm.1dwm.1

@@ -38,22 +38,29 @@ to the

.B master column .TP -.B Mod1-k +.B Mod1-h Focus previous -.B window +.B tag .TP .B Mod1-j Focus next .B window .TP +.B Mod1-k +Focus previous +.B window +.TP +.B Mod1-l +Focus next +.B tag +.TP .B Mod1-m Maximize current .B window .TP .B Mod1-[0..n] Focus -.B nth -tag +.B nth tag .TP .B Mod1-space Toggle between

@@ -65,8 +72,8 @@ .BR "all windows" )

.TP .B Mod1-Shift-[0..n] Apply -.B nth -tag to current +.B nth tag +to current .B window .TP .B Mod1-Shift-q

@@ -79,8 +86,8 @@ .B terminal

.TP .B Mod1-Control-[0..n] Append -.B nth -tag to current +.B nth tag +to current .B window .TP .B Mod1-Button1

@@ -98,5 +105,5 @@ .B window

while dragging .SH CUSTOMIZATION .B dwm -is customized through editing config.h of the source code. This keeps it fast, -secure and simple. +is customized by editing the file config.h of the source code. +This keeps it fast, secure and simple.
M event.cevent.c

@@ -19,7 +19,7 @@ } Key;

KEYS -static unsigned int valid_mask = 255 & ~(NUMLOCKMASK | LockMask); +#define CLEANMASK(mask) (mask & ~(NUMLOCKMASK | LockMask)) static void movemouse(Client *c)

@@ -229,11 +229,11 @@ static unsigned int len = sizeof(key) / sizeof(key[0]);

unsigned int i; KeySym keysym; XKeyEvent *ev = &e->xkey; - ev->state &= valid_mask; keysym = XKeycodeToKeysym(dpy, (KeyCode)ev->keycode, 0); for(i = 0; i < len; i++) - if((keysym == key[i].keysym) && ((key[i].mod & valid_mask) == ev->state)) { + if(keysym == key[i].keysym && + CLEANMASK(key[i].mod) == CLEANMASK(ev->state)) { if(key[i].func) key[i].func(&key[i].arg); return;

@@ -335,13 +335,20 @@ KeyCode code;

for(i = 0; i < len; i++) { code = XKeysymToKeycode(dpy, key[i].keysym); + /* normal */ XUngrabKey(dpy, code, key[i].mod, root); - XUngrabKey(dpy, code, key[i].mod | NUMLOCKMASK, root); - XUngrabKey(dpy, code, key[i].mod | NUMLOCKMASK | LockMask, root); XGrabKey(dpy, code, key[i].mod, root, True, GrabModeAsync, GrabModeAsync); + /* capslock */ + XUngrabKey(dpy, code, key[i].mod | LockMask, root); + XGrabKey(dpy, code, key[i].mod | LockMask, root, True, + GrabModeAsync, GrabModeAsync); + /* numlock */ + XUngrabKey(dpy, code, key[i].mod | NUMLOCKMASK, root); XGrabKey(dpy, code, key[i].mod | NUMLOCKMASK, root, True, GrabModeAsync, GrabModeAsync); + /* capslock & numlock */ + XUngrabKey(dpy, code, key[i].mod | NUMLOCKMASK | LockMask, root); XGrabKey(dpy, code, key[i].mod | NUMLOCKMASK | LockMask, root, True, GrabModeAsync, GrabModeAsync); }