diff options
Diffstat (limited to 'dwm.c')
-rw-r--r-- | dwm.c | 44 |
1 files changed, 44 insertions, 0 deletions
@@ -1663,6 +1663,50 @@ pushup(const Arg *arg) { } void +pushmdown(const Arg *arg) { + Client *sel = selmon->sel, *c; + + if(!sel || sel->isfloating || sel == nexttiled(selmon->clients)) + return; + if((c = nexttiled(sel->next))) { + detach(sel); + sel->next = c->next; + c->next = sel; + } else { + detach(sel); + attach(sel); + } + focus(sel); + arrange(selmon); +} + +void +pushmup(const Arg *arg) { + Client *sel = selmon->sel, *c; + + if(!sel || sel->isfloating) + return; + if((c = prevtiled(sel))) { + detach(sel); + sel->next = c; + if(selmon->clients == c) + selmon->clients = sel; + else { + for(c = selmon->clients; c->next != sel->next; c = c->next); + c->next = sel; + } + } else { + for(c = sel; c->next; c = c->next); + detach(sel); + sel->next = NULL; + c->next = sel; + } + focus(sel); + arrange(selmon); +} + + +void quit(const Arg *arg) { if(arg->i) restart = 1; |