mirror of
https://github.com/mintycube/dwm.git
synced 2024-10-22 14:05:45 +02: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
|
|
}
|