mirror of
https://github.com/eRgo35/dwm.git
synced 2025-12-16 21:56:10 +01:00
initial commit
This commit is contained in:
10
patch/cyclelayouts.c
Normal file
10
patch/cyclelayouts.c
Normal file
@@ -0,0 +1,10 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user