Adding cyclelayouts patch
parent
27b6b4b024
commit
9ccc131284
@ -0,0 +1,16 @@
|
||||
void
|
||||
cyclelayout(const Arg *arg) {
|
||||
Layout *l;
|
||||
for(l = (Layout *)layouts; l != selmon->lt[selmon->sellt]; l++);
|
||||
if(arg->i > 0) {
|
||||
if(l->symbol && (l + 1)->symbol)
|
||||
setlayout(&((Arg) { .v = (l + 1) }));
|
||||
else
|
||||
setlayout(&((Arg) { .v = layouts }));
|
||||
} else {
|
||||
if(l != layouts && (l - 1)->symbol)
|
||||
setlayout(&((Arg) { .v = (l - 1) }));
|
||||
else
|
||||
setlayout(&((Arg) { .v = &layouts[LENGTH(layouts) - 2] }));
|
||||
}
|
||||
}
|
@ -0,0 +1 @@
|
||||
static void cyclelayout(const Arg *arg);
|
Loading…
Reference in New Issue