about summary refs log tree commit diff stats
path: root/dwm.c
diff options
context:
space:
mode:
authorAnselm R Garbe <garbeam@gmail.com>2008-03-04 18:58:23 +0000
committerAnselm R Garbe <garbeam@gmail.com>2008-03-04 18:58:23 +0000
commit96ee9d888cc3cf90da3b6a6852d605255d25d020 (patch)
treed52b1bc9d77cc4e445d1676062af654cea489488 /dwm.c
parenta82cba275981ecd85e68cc68b169c89f79fa60db (diff)
downloaddwm-96ee9d888cc3cf90da3b6a6852d605255d25d020.tar.gz
monocle goes mainstream
Diffstat (limited to 'dwm.c')
-rw-r--r--dwm.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/dwm.c b/dwm.c
index 897eeb4..b417167 100644
--- a/dwm.c
+++ b/dwm.c
@@ -153,6 +153,7 @@ void killclient(const char *arg);
 void manage(Window w, XWindowAttributes *wa);
 void mappingnotify(XEvent *e);
 void maprequest(XEvent *e);
+void monocle(void);
 void movemouse(Client *c);
 Client *nexttiled(Client *c);
 void propertynotify(XEvent *e);
@@ -1072,6 +1073,16 @@ maprequest(XEvent *e) {
 }
 
 void
+monocle(void) {
+	Client *c;
+
+	domwfact = dozoom = False;
+	for(c = clients; c; c = c->next)
+		if(isvisible(c))
+			resize(c, wax, way, waw - 2 * c->border, wah - 2 * c->border, RESIZEHINTS);
+}
+
+void
 movemouse(Client *c) {
 	int x1, y1, ocx, ocy, di, nx, ny;
 	unsigned int dui;
@@ -1412,7 +1423,7 @@ setlayout(const char *arg) {
 	}
 	else {
 		for(i = 0; i < LENGTH(layouts); i++)
-			if(arg == layouts[i].symbol)
+			if(!strcmp(arg, layouts[i].symbol))
 				break;
 		if(i == LENGTH(layouts))
 			return;
artik K. Agaram <vc@akkartik.com> 2015-05-21 18:57:25 -0700 committer Kartik K. Agaram <vc@akkartik.com> 2015-05-21 18:57:25 -0700 1417 - draft zoom levels in traces' href='/akkartik/mu/commit/999spaces.cc?h=hlt&id=7feea75b13522c28d168a5200cfb7a89c06ad161'>7feea75b ^
857adbc4 ^
cdd6fd09 ^
7feea75b ^
cdd6fd09 ^

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