diff options
| author | Thomas Ulmer <thomasmulmer02@gmail.com> | 2025-12-08 11:09:26 -0800 |
|---|---|---|
| committer | Thomas Ulmer <thomasmulmer02@gmail.com> | 2025-12-08 11:09:26 -0800 |
| commit | 78f1d733b5a24bba9cd36c0fde335e14407d12f7 (patch) | |
| tree | 9753aae3a07c84884cd72a475a21b0b3a9cfccf6 /dwm/dwm-movestack-6.6.diff | |
| parent | 09075c06088f20df98deb64662477302faeebf13 (diff) | |
dwm patches to git
Diffstat (limited to 'dwm/dwm-movestack-6.6.diff')
| -rw-r--r-- | dwm/dwm-movestack-6.6.diff | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/dwm/dwm-movestack-6.6.diff b/dwm/dwm-movestack-6.6.diff deleted file mode 100644 index 2fbe3f6..0000000 --- a/dwm/dwm-movestack-6.6.diff +++ /dev/null @@ -1,73 +0,0 @@ -diff -urN ../dwm-clean/config.def.h ./config.def.h ---- ../dwm-clean/config.def.h 2025-08-09 06:00:55.740267680 -0700 -+++ ./config.def.h 2025-12-02 21:53:19.180898042 -0800 -@@ -60,6 +60,7 @@ - static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL }; - static const char *termcmd[] = { "st", NULL }; - -+#include "movestack.c" - static const Key keys[] = { - /* modifier key function argument */ - { MODKEY, XK_p, spawn, {.v = dmenucmd } }, -@@ -71,6 +72,8 @@ - { MODKEY, XK_d, incnmaster, {.i = -1 } }, - { MODKEY, XK_h, setmfact, {.f = -0.05} }, - { MODKEY, XK_l, setmfact, {.f = +0.05} }, -+ { MODKEY|ShiftMask, XK_j, movestack, {.i = +1 } }, -+ { MODKEY|ShiftMask, XK_k, movestack, {.i = -1 } }, - { MODKEY, XK_Return, zoom, {0} }, - { MODKEY, XK_Tab, view, {0} }, - { MODKEY|ShiftMask, XK_c, killclient, {0} }, -diff -urN ../dwm-clean/movestack.c ./movestack.c ---- ../dwm-clean/movestack.c 1969-12-31 16:00:00.000000000 -0800 -+++ ./movestack.c 2025-12-02 21:53:07.589199175 -0800 -@@ -0,0 +1,49 @@ -+void -+movestack(const Arg *arg) { -+ Client *c = NULL, *p = NULL, *pc = NULL, *i; -+ -+ if(arg->i > 0) { -+ /* find the client after selmon->sel */ -+ for(c = selmon->sel->next; c && (!ISVISIBLE(c) || c->isfloating); c = c->next); -+ if(!c) -+ for(c = selmon->clients; c && (!ISVISIBLE(c) || c->isfloating); c = c->next); -+ -+ } -+ else { -+ /* find the client before selmon->sel */ -+ for(i = selmon->clients; i != selmon->sel; i = i->next) -+ if(ISVISIBLE(i) && !i->isfloating) -+ c = i; -+ if(!c) -+ for(; i; i = i->next) -+ if(ISVISIBLE(i) && !i->isfloating) -+ c = i; -+ } -+ /* find the client before selmon->sel and c */ -+ for(i = selmon->clients; i && (!p || !pc); i = i->next) { -+ if(i->next == selmon->sel) -+ p = i; -+ if(i->next == c) -+ pc = i; -+ } -+ -+ /* swap c and selmon->sel selmon->clients in the selmon->clients list */ -+ if(c && c != selmon->sel) { -+ Client *temp = selmon->sel->next==c?selmon->sel:selmon->sel->next; -+ selmon->sel->next = c->next==selmon->sel?c:c->next; -+ c->next = temp; -+ -+ if(p && p != c) -+ p->next = c; -+ if(pc && pc != selmon->sel) -+ pc->next = selmon->sel; -+ -+ if(selmon->sel == selmon->clients) -+ selmon->clients = c; -+ else if(c == selmon->clients) -+ selmon->clients = selmon->sel; -+ -+ arrange(selmon); -+ } -+} -+ |
