Xinqi Bao's Git
40e40e28435c6282139f47711f514a9ba0e2b279
1 /* See LICENSE file for copyright and license details. */
7 static double master
= MASTER
;
12 incmaster(const char *arg
) {
15 if(lt
->arrange
!= tile
)
18 /* arg handling, manipulate master */
19 if(arg
&& (1 == sscanf(arg
, "%lf", &delta
))) {
20 if(delta
+ master
> 0.1 && delta
+ master
< 0.9)
29 unsigned int i
, n
, nx
, ny
, nw
, nh
, mw
, th
;
32 for(n
= 0, c
= nexttiled(clients
); c
; c
= nexttiled(c
->next
))
36 mw
= (n
== 1) ? waw
: master
* waw
;
37 th
= (n
> 1) ? wah
/ (n
- 1) : 0;
43 for(i
= 0, c
= clients
; c
; c
= c
->next
)
49 if(i
== 0) { /* master */
50 nw
= mw
- 2 * c
->border
;
51 nh
= wah
- 2 * c
->border
;
53 else { /* tile window */
58 nw
= waw
- mw
- 2 * c
->border
;
59 if(i
+ 1 == n
) /* remainder */
60 nh
= (way
+ wah
) - ny
- 2 * c
->border
;
62 nh
= th
- 2 * c
->border
;
64 resize(c
, nx
, ny
, nw
, nh
, False
);
65 if(n
> 1 && th
!= wah
)
66 ny
+= nh
+ 2 * c
->border
;
76 zoom(const char *arg
) {
79 if(!sel
|| lt
->arrange
== floating
|| sel
->isfloating
)
81 if((c
= sel
) == nexttiled(clients
))
82 if(!(c
= nexttiled(c
->next
)))