mirror of
https://github.com/bakkeby/dwm-flexipatch
synced 2024-11-09 01:10:26 +00:00
11 lines
273 B
C
11 lines
273 B
C
void
|
|
cyclelayout(const Arg *arg)
|
|
{
|
|
int i;
|
|
int num_layouts = LENGTH(layouts);
|
|
|
|
for (i = 0; i < num_layouts && &layouts[i] != selmon->lt[selmon->sellt]; i++);
|
|
i += arg->i;
|
|
setlayout(&((Arg) { .v = &layouts[(i % num_layouts + num_layouts) % num_layouts] })); // modulo
|
|
}
|