about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--client.c13
-rw-r--r--dwm.163
-rw-r--r--dwm.h4
-rw-r--r--event.c36
-rw-r--r--tag.c8
5 files changed, 59 insertions, 65 deletions
diff --git a/client.c b/client.c
index 158b928..522a425 100644
--- a/client.c
+++ b/client.c
@@ -192,7 +192,7 @@ lower(Client *c)
 void
 manage(Window w, XWindowAttributes *wa)
 {
-	Client *c, **l;
+	Client *c;
 	XSetWindowAttributes twa;
 	Window trans;
 
@@ -223,10 +223,11 @@ manage(Window w, XWindowAttributes *wa)
 	settitle(c);
 	settags(c);
 
-	for(l = &clients; *l; l = &(*l)->next);
-	c->next = *l; /* *l == nil */
-	*l = c;
+	c->next = clients;
+	clients = c;
 
+	XGrabButton(dpy, Button1, ControlMask, c->win, False, ButtonPressMask,
+			GrabModeAsync, GrabModeSync, None, None);
 	XGrabButton(dpy, Button1, Mod1Mask, c->win, False, ButtonPressMask,
 			GrabModeAsync, GrabModeSync, None, None);
 	XGrabButton(dpy, Button2, Mod1Mask, c->win, False, ButtonPressMask,
@@ -234,8 +235,8 @@ manage(Window w, XWindowAttributes *wa)
 	XGrabButton(dpy, Button3, Mod1Mask, c->win, False, ButtonPressMask,
 			GrabModeAsync, GrabModeSync, None, None);
 
-	if(!c->dofloat)
-		c->dofloat = trans
+	if(!c->isfloat)
+		c->isfloat = trans
 			|| ((c->maxw == c->minw) && (c->maxh == c->minh));
 
 	arrange(NULL);
diff --git a/dwm.1 b/dwm.1
index 6ae2c39..56dd8b9 100644
--- a/dwm.1
+++ b/dwm.1
@@ -5,63 +5,44 @@ dwm \- dynamic window manager
 .B dwm
 .RB [ \-v ]
 .SH DESCRIPTION
-.SS Overview
 .B dwm
-is a dynamic window manager for X11. It consists of a small status bar at the
-top of the screen and arranges windows in either a tiled or floating mode.
+is a dynamic window manager for X11. It consists of a small status bar and
+arranges windows in either a tiled or floating mode.
 .P
-If 
+In tiled mode
 .B dwm
-is in tiled mode, it consists of two columns. The left master column
-contains only one window per time, the right column contains all other windows 
-in a stack. In tiled mode
-.B dwm
-.B don't
-handles incremental resizals, some terminal programs like
-.B xterm
-may not work correctly with this in tiled mode.
+manages all windows in a left master column and a right stacking column. The
+master column contains a single window, the left stacking column all other
+windows. Dialog windows are treated floating.
 .P
-If
-.B dwm
-is in floating mode, it arranges all windows with the reqyested geometry and
-allows the user to move or resize them. Some windows, like
-dialog windows, are treated floating even if
+In floating mode
 .B dwm
-is in tiled mode. In floating mode
-.B dwm
-handles incremental resizals.
+manages all windows in a conventional way. They can be resized and moved freely
+with the mouse.
 .P
 Windows are grouped by tags. You can view all windows with a specific tag per
 time.  However, each window is allowed to contain more than one tag, which
 allows to make windows visible in all views.
 .P
 .B dwm
-reads from
-.I stdin
-to display status text, if written.
+reads from standard input to display status text, if written.
 .P
 .B dwm
-draws 1-pixel borders around windows to indicate the focus state and save as
+draws 1-pixel borders around windows to indicate the focus state and providing as
 much screen real estate as possible. Unfocused windows contain a small bar
 in front of the window indicating the tags and the window title.
-.SS Options
+.SH OPTIONS
 .TP
 .B \-v
-prints version information to
-.I stdout
-, then exits.
-.SS Customization
+prints version information to standard output, then exits.
+.SH CUSTOMIZATION
 .B dwm
 is customized through editing its source code. It is assumed that
-dwm users are high experienced users who know how a window manager works
-and who are able to patch
-.B dwm
-for their needs. This keeps
 .B dwm
-fast, secure and simple, because it does not process any input data, except
-window properties and the status text read from
-.I stdin .
-.SS Default Key Bindings
+users know to patch it for their needs. This keeps it fast, secure and simple,
+because it does not process any input data, except window properties and
+the status text read from standard input.
+.SS Keyboard Control
 .TP 16
 .I Key	
 .I Action
@@ -71,7 +52,7 @@ Zoom
 .B window
 to the 
 .B master
-track
+column
 .TP
 .B Mod1-k
 Focus previous
@@ -127,7 +108,7 @@ Append
 .B nth
 tag to cureent
 .B window
-.SS Default Mouse Bindings
+.SS Mouse Control
 .TP
 .B Mod1-Button1
 Moves current
@@ -142,7 +123,3 @@ Lowers current
 Resizes current
 .B window
 while dragging
-.SH BUGS
-Some terminal programs do not behave correctly in tiled mode, because
-incremental resizals are ignored to use maximum screen real estate. You can
-patch the code to fix this.
diff --git a/dwm.h b/dwm.h
index e43301c..75aa50c 100644
--- a/dwm.h
+++ b/dwm.h
@@ -71,7 +71,7 @@ struct Client {
 	int grav;
 	unsigned int border;
 	long flags; 
-	Bool dofloat;
+	Bool isfloat;
 	Window win;
 	Window title;
 	Client *next;
@@ -82,7 +82,7 @@ struct Rule {
 	const char *class;
 	const char *instance;
 	char *tags[TLast];
-	Bool dofloat;
+	Bool isfloat;
 };
 
 struct Key {
diff --git a/event.c b/event.c
index e948cb3..ecbb8d2 100644
--- a/event.c
+++ b/event.c
@@ -14,8 +14,8 @@
 /********** CUSTOMIZE **********/
 
 const char *term[] = { 
-	"urxvtc", "-tr", "+sb", "-bg", "black", "-fg", "white", "-fn",
-	"-*-terminus-medium-*-*-*-13-*-*-*-*-*-iso10646-*",NULL
+	"urxvtc", "-tr", "+sb", "-bg", "black", "-fg", "white", "-cr", "white",
+	"-fn", "-*-terminus-medium-*-*-*-13-*-*-*-*-*-iso10646-*", NULL
 };
 const char *browse[] = { "firefox", NULL };
 const char *xlock[] = { "xlock", NULL };
@@ -128,18 +128,34 @@ buttonpress(XEvent *e)
 	Client *c;
 
 	if(barwin == ev->window) {
-		x = 0;
-		for(a.i = 0; a.i < TLast; a.i++) {
-			x += textw(tags[a.i]);
-			if(ev->x < x) {
-				view(&a);
-				break;
+		switch(ev->button) {
+		default:
+			x = 0;
+			for(a.i = 0; a.i < TLast; a.i++) {
+				x += textw(tags[a.i]);
+				if(ev->x < x) {
+					view(&a);
+					break;
+				}
 			}
+			break;
+		case Button4:
+			a.i = (tsel + 1 < TLast) ? tsel + 1 : 0;
+			view(&a);
+			break;
+		case Button5:
+			a.i = (tsel - 1 >= 0) ? tsel - 1 : TLast - 1;
+			view(&a);
+			break;
 		}
 	}
 	else if((c = getclient(ev->window))) {
-		if(arrange == dotile && !c->dofloat)
+		if(arrange == dotile && !c->isfloat) {
+			if((ev->state & ControlMask) && (ev->button == Button1))
+				zoom(NULL);
 			return;
+		}
+		/* floating windows */
 		higher(c);
 		switch(ev->button) {
 		default:
@@ -297,7 +313,7 @@ propertynotify(XEvent *e)
 			default: break;
 			case XA_WM_TRANSIENT_FOR:
 				XGetTransientForHint(dpy, c->win, &trans);
-				if(!c->dofloat && (c->dofloat = (trans != 0)))
+				if(!c->isfloat && (c->isfloat = (trans != 0)))
 					arrange(NULL);
 				break;
 			case XA_WM_NORMAL_HINTS:
diff --git a/tag.c b/tag.c
index 8951dd8..48f1f2a 100644
--- a/tag.c
+++ b/tag.c
@@ -17,7 +17,7 @@ char *tags[TLast] = {
 };
 
 static Rule rule[] = {
-	/* class			instance	tags						dofloat */
+	/* class			instance	tags						isfloat */
 	{ "Firefox-bin",	"Gecko",	{ [Twww] = "www" },			False },
 };
 
@@ -67,7 +67,7 @@ dotile(Arg *arg)
 	w = sw - mw;
 	arrange = dotile;
 	for(n = 0, c = clients; c; c = c->next)
-		if(c->tags[tsel] && !c->dofloat)
+		if(c->tags[tsel] && !c->isfloat)
 			n++;
 
 	if(n > 1)
@@ -77,7 +77,7 @@ dotile(Arg *arg)
 
 	for(i = 0, c = clients; c; c = c->next) {
 		if(c->tags[tsel]) {
-			if(c->dofloat) {
+			if(c->isfloat) {
 				higher(c);
 				resize(c, True);
 				continue;
@@ -155,7 +155,7 @@ settags(Client *c)
 				{
 					for(j = 0; j < TLast; j++)
 						c->tags[j] = rule[i].tags[j];
-					c->dofloat = rule[i].dofloat;
+					c->isfloat = rule[i].isfloat;
 					matched = True;
 					break;
 				}
revious revision' href='/akspecs/ranger/blame/ranger/container/settings.py?h=v1.9.0b1&id=d7b2660eb16847f0fce5beef94ac496d57fb27d3'>^
d1a1173d ^


48d5bf92 ^
d1a1173d ^




0416393c ^






























d1a1173d ^






e124e269 ^

d1a1173d ^




fd212529 ^




48d5bf92 ^





d1a1173d ^




















































0416393c ^
d1a1173d ^

48d5bf92 ^





d1a1173d ^


e124e269 ^

d1a1173d ^








864331a0 ^

eb7b0a7b ^
d1a1173d ^





















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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233