equal
deleted
inserted
replaced
67 LAYOUTS |
67 LAYOUTS |
68 |
68 |
69 /* extern */ |
69 /* extern */ |
70 |
70 |
71 void |
71 void |
|
72 focusnext(Arg *arg) { |
|
73 Client *c; |
|
74 |
|
75 if(!sel) |
|
76 return; |
|
77 for(c = sel->next; c && !isvisible(c); c = c->next); |
|
78 if(!c) |
|
79 for(c = clients; c && !isvisible(c); c = c->next); |
|
80 if(c) { |
|
81 focus(c); |
|
82 restack(); |
|
83 } |
|
84 } |
|
85 |
|
86 void |
|
87 focusprev(Arg *arg) { |
|
88 Client *c; |
|
89 |
|
90 if(!sel) |
|
91 return; |
|
92 for(c = sel->prev; c && !isvisible(c); c = c->prev); |
|
93 if(!c) { |
|
94 for(c = clients; c && c->next; c = c->next); |
|
95 for(; c && !isvisible(c); c = c->prev); |
|
96 } |
|
97 if(c) { |
|
98 focus(c); |
|
99 restack(); |
|
100 } |
|
101 } |
|
102 |
|
103 void |
72 incnmaster(Arg *arg) { |
104 incnmaster(Arg *arg) { |
73 if((lt->arrange != tile) || (nmaster + arg->i < 1) |
105 if((lt->arrange != tile) || (nmaster + arg->i < 1) |
74 || (wah / (nmaster + arg->i) <= 2 * BORDERPX)) |
106 || (wah / (nmaster + arg->i) <= 2 * BORDERPX)) |
75 return; |
107 return; |
76 nmaster += arg->i; |
108 nmaster += arg->i; |
89 for(blw = i = 0; i < nlayouts; i++) { |
121 for(blw = i = 0; i < nlayouts; i++) { |
90 w = textw(layout[i].symbol); |
122 w = textw(layout[i].symbol); |
91 if(w > blw) |
123 if(w > blw) |
92 blw = w; |
124 blw = w; |
93 } |
125 } |
|
126 } |
|
127 |
|
128 Client * |
|
129 nexttiled(Client *c) { |
|
130 for(; c && (c->isversatile || !isvisible(c)); c = c->next); |
|
131 return c; |
94 } |
132 } |
95 |
133 |
96 void |
134 void |
97 resizemaster(Arg *arg) { |
135 resizemaster(Arg *arg) { |
98 if(lt->arrange != tile) |
136 if(lt->arrange != tile) |
152 else |
190 else |
153 drawstatus(); |
191 drawstatus(); |
154 } |
192 } |
155 |
193 |
156 void |
194 void |
157 toggleversatile(Arg *arg) { |
|
158 if(!sel || lt->arrange == versatile) |
|
159 return; |
|
160 sel->isversatile = !sel->isversatile; |
|
161 lt->arrange(); |
|
162 } |
|
163 |
|
164 void |
|
165 versatile(void) { |
195 versatile(void) { |
166 Client *c; |
196 Client *c; |
167 |
197 |
168 for(c = clients; c; c = c->next) { |
198 for(c = clients; c; c = c->next) { |
169 if(isvisible(c)) { |
199 if(isvisible(c)) { |