sites

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 7a36fc6c92ba97ae92c7da60dd824bb8dd8c0375
parent 42ada92d9a29acfc483a6610feec236080cc1a94
Author: Jan Christoph Ebersbach <jceb@e-jc.de>
Date:   Tue, 14 Feb 2012 21:37:10 +0100

add zoomswap patch for dwm 6.0
Diffstat:
Adwm.suckless.org/patches/dwm-6.0-zoomswap.diff | 49+++++++++++++++++++++++++++++++++++++++++++++++++
Adwm.suckless.org/patches/zoomswap.md | 47+++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 96 insertions(+), 0 deletions(-)

diff --git a/dwm.suckless.org/patches/dwm-6.0-zoomswap.diff b/dwm.suckless.org/patches/dwm-6.0-zoomswap.diff @@ -0,0 +1,49 @@ +URL: http://dwm.suckless.org/patches/zoomswap +This patch swaps the current window with the previous master when zooming. + +diff -r 6f54bd1ef439 dwm.c +--- a/dwm.c Wed Jan 04 13:30:12 2012 +0100 ++++ b/dwm.c Tue Feb 14 07:09:37 2012 +0100 +@@ -253,6 +253,7 @@ + static void zoom(const Arg *arg); + + /* variables */ ++static Client *prevzoom = NULL; + static const char broken[] = "broken"; + static char stext[256]; + static int screen; +@@ -2116,14 +2117,32 @@ + void + zoom(const Arg *arg) { + Client *c = selmon->sel; ++ Client *at, *tmp; + + if(!selmon->lt[selmon->sellt]->arrange + || (selmon->sel && selmon->sel->isfloating)) + return; + if(c == nexttiled(selmon->clients)) +- if(!c || !(c = nexttiled(c->next))) +- return; ++ if(!c || !(c = nexttiled(prevzoom))) { ++ c = selmon->sel; ++ if(!c || !(c = nexttiled(c->next))) ++ return; ++ } ++ for(at = selmon->clients; at && at->next && at != c && at->next != c; at = nexttiled(at->next)) ; + pop(c); ++ /* swap windows instead of pushing the previous one down */ ++ if(at && at != c) { ++ /* store c's next neighbor - this window needs to be moved away */ ++ tmp = prevzoom = c->next; ++ if(c->next != at) { ++ /* detach c's neighbor from the list of windows */ ++ c->next = tmp->next; ++ /* attach tmp after c's previous neighbor */ ++ tmp->next = at->next; ++ at->next = tmp; ++ arrange(c->mon); ++ } ++ } + } + + int diff --git a/dwm.suckless.org/patches/zoomswap.md b/dwm.suckless.org/patches/zoomswap.md @@ -0,0 +1,47 @@ +ZOOMSWAP +======== + +Description +----------- +This patch swaps the current window (C) with the previous master (P) when zooming. + + Original behaviour : + +-----------------+-------+ + | | | + | | | + | | | + | P +-------| + | | | + | | C | + | | | + +-----------------+-------+ + + +-----------------+-------+ + | | | + | | P | + | | | + | C +-------| + | | | + | | | + | | | + +-----------------+-------+ + + + New Behaviour : + +-----------------+-------+ + | | | + | | | + | | | + | C +-------+ + | | | + | | P | + | | | + +-----------------+-------+ + +Download +-------- +* [dwm-6.0-zoomswap.diff](dwm-6.0-zoomswap.diff) (1.4K) (20120214) + +Author +------ +* Jan Christoph Ebersbach - `<jceb at e-jc dot de>`