Another copy of my dotfiles. Because I don't completely trust GitHub.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
423 B

  1. void
  2. cyclelayout(const Arg *arg)
  3. {
  4. Layout *l;
  5. for (l = (Layout *)layouts; l != selmon->lt[selmon->sellt]; l++);
  6. if (arg->i > 0) {
  7. if (l->symbol && (l + 1)->symbol)
  8. setlayout(&((Arg) { .v = (l + 1) }));
  9. else
  10. setlayout(&((Arg) { .v = layouts }));
  11. } else {
  12. if (l != layouts && (l - 1)->symbol)
  13. setlayout(&((Arg) { .v = (l - 1) }));
  14. else
  15. setlayout(&((Arg) { .v = &layouts[LENGTH(layouts) - 2] }));
  16. }
  17. }