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.

42 lines
750 B

  1. Client *
  2. prevt(Client *c)
  3. {
  4. Client *p, *r;
  5. for (p = selmon->clients, r = NULL; p && p != c; p = p->next)
  6. if (!p->isfloating && ISVISIBLE(p))
  7. r = p;
  8. return r;
  9. }
  10. void
  11. pushup(const Arg *arg)
  12. {
  13. Client *sel = selmon->sel, *c;
  14. if (!sel || sel->isfloating)
  15. return;
  16. if ((c = prevt(sel)) && c != nexttiled(selmon->clients)) {
  17. detach(sel);
  18. sel->next = c;
  19. for (c = selmon->clients; c->next != sel->next; c = c->next);
  20. c->next = sel;
  21. }
  22. focus(sel);
  23. arrange(selmon);
  24. }
  25. void
  26. pushdown(const Arg *arg)
  27. {
  28. Client *sel = selmon->sel, *c;
  29. if (!sel || sel->isfloating || sel == nexttiled(selmon->clients))
  30. return;
  31. if ((c = nexttiled(sel->next))) {
  32. detach(sel);
  33. sel->next = c->next;
  34. c->next = sel;
  35. }
  36. focus(sel);
  37. arrange(selmon);
  38. }