Introduction
Introduction Statistics Contact Development Disclaimer Help
tapplied Sanders patches (numlock2) - dwm - [fork] customized build of dwm, the…
git clone git://src.adamsgaard.dk/dwm
Log
Files
Refs
README
LICENSE
---
commit 3af6434085aee75bd90e22aee95419dc0ae0b969
parent 57871415c16664cce494b68dd3e985bcb32942c5
Author: [email protected] <unknown>
Date: Wed, 2 Aug 2006 11:13:32 +0200
applied Sanders patches (numlock2)
Diffstat:
M config.arg.h | 4 ++--
M config.h | 4 ++--
M config.mk | 14 +++++++-------
M dwm.1 | 27 +++++++++++++++++----------
M event.c | 17 ++++++++++++-----
5 files changed, 40 insertions(+), 26 deletions(-)
---
diff --git a/config.arg.h b/config.arg.h
t@@ -3,9 +3,7 @@
* 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-*-*-*-*-*-iso…
#define BGCOLOR "#0a2c2d"
#define FGCOLOR "#ddeeee"
t@@ -14,6 +12,7 @@ enum { Tfnord, Tdev, Tnet, Twork, Tmisc, TLast };
#define NUMLOCKMASK Mod2Mask
#define MASTERW 52 /* percent */
+enum { Tfnord, Tdev, Tnet, Twork, Tmisc, TLast };
#define TAGS \
char *tags[TLast] = { \
[Tfnord] = "fnord", \
t@@ -22,6 +21,7 @@ char *tags[TLast] = { \
[Twork] = "work", \
[Tmisc] = "misc", \
};
+#define DEFTAG Tdev
#define KEYS \
const char *browse[] = { "firefox", NULL }; \
diff --git a/config.h b/config.h
t@@ -3,9 +3,7 @@
* 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"
t@@ -14,6 +12,7 @@ enum { Tfnord, Tdev, Tnet, Twork, Tmisc, TLast };
#define NUMLOCKMASK Mod2Mask
#define MASTERW 52 /* percent */
+enum { Tfnord, Tdev, Tnet, Twork, Tmisc, TLast };
#define TAGS \
char *tags[TLast] = { \
[Tfnord] = "fnord", \
t@@ -22,6 +21,7 @@ char *tags[TLast] = { \
[Twork] = "work", \
[Tmisc] = "misc", \
};
+#define DEFTAG Tdev
#define KEYS \
const char *term[] = { "xterm", NULL }; \
diff --git a/config.mk b/config.mk
t@@ -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
t@@ -11,12 +17,6 @@ X11LIB = /usr/X11R6/lib
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}\"
LDFLAGS = ${LIBS}
diff --git a/dwm.1 b/dwm.1
t@@ -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
t@@ -65,8 +72,8 @@ mode (affects
.TP
.B Mod1-Shift-[0..n]
Apply
-.B nth
-tag to current
+.B nth tag
+to current
.B window
.TP
.B Mod1-Shift-q
t@@ -79,8 +86,8 @@ Start
.TP
.B Mod1-Control-[0..n]
Append
-.B nth
-tag to current
+.B nth tag
+to current
.B window
.TP
.B Mod1-Button1
t@@ -98,5 +105,5 @@ Resizes current
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.
diff --git a/event.c b/event.c
t@@ -19,7 +19,7 @@ typedef struct {
KEYS
-static unsigned int valid_mask = 255 & ~(NUMLOCKMASK | LockMask);
+#define CLEANMASK(mask) (mask & ~(NUMLOCKMASK | LockMask))
static void
movemouse(Client *c)
t@@ -229,11 +229,11 @@ keypress(XEvent *e)
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) == …
+ if(keysym == key[i].keysym &&
+ CLEANMASK(key[i].mod) == CLEANMASK(ev->state))…
if(key[i].func)
key[i].func(&key[i].arg);
return;
t@@ -335,13 +335,20 @@ grabkeys()
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, roo…
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, roo…
XGrabKey(dpy, code, key[i].mod | NUMLOCKMASK | LockMask, root,…
GrabModeAsync, GrabModeAsync);
}
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.