Xinqi Bao's Git
1 /* See LICENSE file for copyright and license details. */
10 static unsigned int nlayouts
= 0;
17 focusclient(const char *arg
) {
23 for(c
= sel
->prev
; c
&& !isvisible(c
); c
= c
->prev
);
25 for(c
= clients
; c
&& c
->next
; c
= c
->next
);
26 for(; c
&& !isvisible(c
); c
= c
->prev
);
30 for(c
= sel
->next
; c
&& !isvisible(c
); c
= c
->next
);
32 for(c
= clients
; c
&& !isvisible(c
); c
= c
->next
);
45 nlayouts
= sizeof layout
/ sizeof layout
[0];
46 for(blw
= i
= 0; i
< nlayouts
; i
++) {
47 w
= textw(layout
[i
].symbol
);
54 nexttiled(Client
*c
) {
55 for(; c
&& (c
->isfloating
|| !isvisible(c
)); c
= c
->next
);
68 if(sel
->isfloating
|| lt
->arrange
== floating
)
69 XRaiseWindow(dpy
, sel
->win
);
70 if(lt
->arrange
!= floating
) {
71 wc
.stack_mode
= Below
;
73 if(!sel
->isfloating
) {
74 XConfigureWindow(dpy
, sel
->win
, CWSibling
| CWStackMode
, &wc
);
75 wc
.sibling
= sel
->win
;
77 for(c
= nexttiled(clients
); c
; c
= nexttiled(c
->next
)) {
80 XConfigureWindow(dpy
, c
->win
, CWSibling
| CWStackMode
, &wc
);
85 while(XCheckMaskEvent(dpy
, EnterWindowMask
, &ev
));
89 setlayout(const char *arg
) {
94 if(lt
== layout
+ nlayouts
)
99 if(i
< 0 || i
>= nlayouts
)
110 togglebar(const char *arg
) {
112 bpos
= (BARPOS
== BarOff
) ? BarTop
: BARPOS
;