about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--client.c30
-rw-r--r--dev.c5
-rw-r--r--dwm.h3
-rw-r--r--dwm.html6
4 files changed, 19 insertions, 25 deletions
diff --git a/client.c b/client.c
index 5e7321d..d3b731b 100644
--- a/client.c
+++ b/client.c
@@ -11,9 +11,7 @@
 
 #include "dwm.h"
 
-static void floating(void);
-static void tiling(void);
-static void (*arrange)(void) = floating;
+static void (*arrange)(void *) = floating;
 
 void
 max(void *aux)
@@ -24,27 +22,30 @@ max(void *aux)
 	stack->y = sy;
 	stack->w = sw - 2 * stack->border;
 	stack->h = sh - 2 * stack->border;
+	craise(stack);
 	resize(stack);
 	discard_events(EnterWindowMask);
 }
 
-static void
-floating(void)
+void
+floating(void *aux)
 {
 	Client *c;
 
+	arrange = floating;
 	for(c = stack; c; c = c->snext)
 		resize(c);
 	discard_events(EnterWindowMask);
 }
 
-static void
-tiling(void)
+void
+tiling(void *aux)
 {
 	Client *c;
 	int n, cols, rows, gw, gh, i, j;
     float rt, fd;
 
+	arrange = tiling;
 	if(!clients)
 		return;
 	for(n = 0, c = clients; c; c = c->next, n++);
@@ -76,17 +77,6 @@ tiling(void)
 }
 
 void
-toggle(void *aux)
-{
-	if(arrange == floating)
-		arrange = tiling;
-	else
-		arrange = floating;
-	arrange();
-}
-
-
-void
 sel(void *aux)
 {
 	const char *arg = aux;
@@ -280,7 +270,7 @@ manage(Window w, XWindowAttributes *wa)
 			GrabModeAsync, GrabModeSync, None, None);
 	XGrabButton(dpy, Button3, Mod1Mask, c->win, False, ButtonPressMask,
 			GrabModeAsync, GrabModeSync, None, None);
-	arrange();
+	arrange(NULL);
 	XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w / 2, c->h / 2);
 	focus(c);
 }
@@ -400,7 +390,7 @@ unmanage(Client *c)
 	XFlush(dpy);
 	XSetErrorHandler(error_handler);
 	XUngrabServer(dpy);
-	arrange();
+	arrange(NULL);
 	if(stack)
 		focus(stack);
 }
diff --git a/dev.c b/dev.c
index 221715e..b25d9e3 100644
--- a/dev.c
+++ b/dev.c
@@ -17,13 +17,16 @@ const char *term[] = {
 	"-*-terminus-medium-*-*-*-13-*-*-*-*-*-iso10646-*",NULL
 };
 const char *browse[] = { "firefox", NULL };
+const char *xlock[] = { "xlock", NULL };
 
 static Key key[] = {
 	{ Mod1Mask, XK_Return, (void (*)(void *))spawn, term },
 	{ Mod1Mask, XK_w, (void (*)(void *))spawn, browse },
+	{ Mod1Mask, XK_l, (void (*)(void *))spawn, xlock },
 	{ Mod1Mask, XK_k, sel, "prev" }, 
 	{ Mod1Mask, XK_j, sel, "next" }, 
-	{ Mod1Mask, XK_space, toggle, NULL }, 
+	{ Mod1Mask, XK_t, tiling, NULL }, 
+	{ Mod1Mask, XK_f, tiling, NULL }, 
 	{ Mod1Mask, XK_m, max, NULL }, 
 	{ Mod1Mask | ShiftMask, XK_c, ckill, NULL }, 
 	{ Mod1Mask | ShiftMask, XK_q, quit, NULL },
diff --git a/dwm.h b/dwm.h
index acfdcbb..1d672fd 100644
--- a/dwm.h
+++ b/dwm.h
@@ -100,7 +100,8 @@ extern void lower(Client *c);
 extern void ckill(void *aux);
 extern void sel(void *aux);
 extern void max(void *aux);
-extern void toggle(void *aux);
+extern void floating(void *aux);
+extern void tiling(void *aux);
 extern void gravitate(Client *c, Bool invert);
 
 /* draw.c */
diff --git a/dwm.html b/dwm.html
index 4b2f663..995c6fd 100644
--- a/dwm.html
+++ b/dwm.html
@@ -59,9 +59,9 @@
 			</li>
 			<li>
 			garbeam <b>does not</b> want any feedback to dwm. If you ask for support,
-			feature requests or if you report bugs, they will be <b>ignored</b>
-			with a high chance. dwm is only intended to fit garbeam's needs,
-			however you are free to download and distribute/relicense it, with the
+			feature requests, or if you report bugs, they will be <b>ignored</b>
+			with a high chance. dwm is only intended to fit garbeams needs.
+			However you are free to download and distribute/relicense it, with the
 			conditions of the <a href="http://wmii.de/cgi-bin/hgwebdir.cgi/dwm?f=f10eb1139362;file=LICENSE;style=raw">MIT/X Consortium license</a>.
 			</li>
 		</ul>
909e3c21463addc8af'>^
7160f98 ^


8fa4583 ^
2a09617 ^
ecd803a ^
2a09617 ^
8635c70 ^
2a09617 ^
905cb9d ^
a073d76 ^
8fa4583 ^



661e3ec ^

7160f98 ^
ecd803a ^

905cb9d ^
7160f98 ^


ecd803a ^











661e3ec ^
5685a17 ^
661e3ec ^

1418e1b ^
8fa4583 ^
661e3ec ^

1170893 ^
8fa4583 ^
661e3ec ^

80e891a ^



cc639a1 ^
8635c70 ^
72e4b5e ^
8635c70 ^
ecd803a ^
8635c70 ^





80e891a ^
72e4b5e ^
8635c70 ^
ecd803a ^
8fa4583 ^

661e3ec ^



ecd803a ^




6838c23 ^
ecd803a ^








6838c23 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114