equal
deleted
inserted
replaced
1 /* (C)opyright MMVI-MMVII Anselm R. Garbe <garbeam at gmail dot com> |
1 /* (C)opyright MMVI-MMVII Anselm R. Garbe <garbeam at gmail dot com> |
2 * See LICENSE file for license details. |
2 * See LICENSE file for license details. |
3 */ |
3 */ |
4 #include "dwm.h" |
4 #include "dwm.h" |
|
5 #include <stdio.h> |
5 |
6 |
6 /* static */ |
7 /* static */ |
7 |
8 |
8 static Client * |
9 static Client * |
9 nexttiled(Client *c) { |
10 nexttiled(Client *c) { |
147 } |
148 } |
148 } |
149 } |
149 |
150 |
150 void |
151 void |
151 incnmaster(Arg *arg) { |
152 incnmaster(Arg *arg) { |
152 if((nmaster + arg->i < 1) || (wah / (nmaster + arg->i) < bh)) |
153 if((arrange == dofloat) || (nmaster + arg->i < 1) || (wah / (nmaster + arg->i) < bh)) |
153 return; |
154 return; |
154 nmaster += arg->i; |
155 nmaster += arg->i; |
155 arrange(); |
156 snprintf(mtext, sizeof mtext, arrange == dofloat ? FLOATSYMBOL : TILESYMBOL, nmaster); |
|
157 bmw = textw(mtext); |
|
158 if(sel) |
|
159 arrange(); |
|
160 else |
|
161 drawstatus(); |
156 } |
162 } |
157 |
163 |
158 Bool |
164 Bool |
159 isvisible(Client *c) { |
165 isvisible(Client *c) { |
160 unsigned int i; |
166 unsigned int i; |
216 } |
222 } |
217 |
223 |
218 void |
224 void |
219 togglemode(Arg *arg) { |
225 togglemode(Arg *arg) { |
220 arrange = (arrange == dofloat) ? dotile : dofloat; |
226 arrange = (arrange == dofloat) ? dotile : dofloat; |
|
227 snprintf(mtext, sizeof mtext, arrange == dofloat ? FLOATSYMBOL : TILESYMBOL, nmaster); |
|
228 bmw = textw(mtext); |
221 if(sel) |
229 if(sel) |
222 arrange(); |
230 arrange(); |
223 else |
231 else |
224 drawstatus(); |
232 drawstatus(); |
225 } |
233 } |