diff options
| -rw-r--r-- | config.def.h | 2 | ||||
| -rw-r--r-- | config.h | 2 | ||||
| -rw-r--r-- | drw.o | bin | 11240 -> 0 bytes | |||
| -rwxr-xr-x | dwm | bin | 81528 -> 0 bytes | |||
| -rw-r--r-- | dwm-push_no_master-6.4.diff | 70 | ||||
| -rw-r--r-- | dwm.c | 44 | ||||
| -rw-r--r-- | dwm.c.orig | 35 | ||||
| -rw-r--r-- | dwm.o | bin | 75184 -> 0 bytes | |||
| -rw-r--r-- | util.o | bin | 2392 -> 0 bytes |
9 files changed, 11 insertions, 142 deletions
diff --git a/config.def.h b/config.def.h index 1f750b5..345be84 100644 --- a/config.def.h +++ b/config.def.h @@ -99,8 +99,6 @@ static const Key keys[] = { { MODKEY, XK_minus, setgaps, {.i = -1 } }, { MODKEY, XK_equal, setgaps, {.i = +1 } }, { MODKEY|ShiftMask, XK_equal, setgaps, {.i = 0 } }, - { MODKEY|ShiftMask, XK_j, pushdown, {0} }, - { MODKEY|ShiftMask, XK_k, pushup, {0} }, TAGKEYS( XK_1, 0) TAGKEYS( XK_2, 1) TAGKEYS( XK_3, 2) @@ -99,8 +99,6 @@ static const Key keys[] = { { MODKEY, XK_minus, setgaps, {.i = -1 } }, { MODKEY, XK_equal, setgaps, {.i = +1 } }, { MODKEY|ShiftMask, XK_equal, setgaps, {.i = 0 } }, - { MODKEY|ShiftMask, XK_j, pushdown, {0} }, - { MODKEY|ShiftMask, XK_k, pushup, {0} }, TAGKEYS( XK_1, 0) TAGKEYS( XK_2, 1) TAGKEYS( XK_3, 2) Binary files differBinary files differdiff --git a/dwm-push_no_master-6.4.diff b/dwm-push_no_master-6.4.diff deleted file mode 100644 index 11f76a2..0000000 --- a/dwm-push_no_master-6.4.diff +++ /dev/null @@ -1,70 +0,0 @@ -diff --git a/dwm.c b/dwm.c -index e5efb6a..660a8ac 100644 ---- a/dwm.c -+++ b/dwm.c -@@ -186,7 +186,10 @@ static void motionnotify(XEvent *e); - static void movemouse(const Arg *arg); - static Client *nexttiled(Client *c); - static void pop(Client *c); -+static Client *prevtiled(Client *c); - static void propertynotify(XEvent *e); -+static void pushdown(const Arg *arg); -+static void pushup(const Arg *arg); - static void quit(const Arg *arg); - static Monitor *recttomon(int x, int y, int w, int h); - static void resize(Client *c, int x, int y, int w, int h, int interact); -@@ -1209,6 +1212,16 @@ pop(Client *c) - arrange(c->mon); - } - -+Client * -+prevtiled(Client *c) { -+ Client *p, *r; -+ -+ for(p = selmon->clients, r = NULL; p && p != c; p = p->next) -+ if(!p->isfloating && ISVISIBLE(p)) -+ r = p; -+ return r; -+} -+ - void - propertynotify(XEvent *e) - { -@@ -1246,6 +1259,37 @@ propertynotify(XEvent *e) - } - } - -+void -+pushdown(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; -+ } -+ focus(sel); -+ arrange(selmon); -+} -+ -+void -+pushup(const Arg *arg) { -+ Client *sel = selmon->sel, *c; -+ -+ if(!sel || sel->isfloating) -+ return; -+ if((c = prevtiled(sel)) && c != nexttiled(selmon->clients)) { -+ detach(sel); -+ sel->next = c; -+ for(c = selmon->clients; c->next != sel->next; c = c->next); -+ c->next = sel; -+ } -+ focus(sel); -+ arrange(selmon); -+} -+ - void - quit(const Arg *arg) - { @@ -236,10 +236,7 @@ static void motionnotify(XEvent *e); static void movemouse(const Arg *arg); static Client *nexttiled(Client *c); static void pop(Client *c); -static Client *prevtiled(Client *c); static void propertynotify(XEvent *e); -static void pushdown(const Arg *arg); -static void pushup(const Arg *arg); static void quit(const Arg *arg); static Monitor *recttomon(int x, int y, int w, int h); static void removesystrayicon(Client *i); @@ -1472,16 +1469,6 @@ pop(Client *c) arrange(c->mon); } -Client * -prevtiled(Client *c) { - Client *p, *r; - - for(p = selmon->clients, r = NULL; p && p != c; p = p->next) - if(!p->isfloating && ISVISIBLE(p)) - r = p; - return r; -} - void propertynotify(XEvent *e) { @@ -1531,37 +1518,6 @@ propertynotify(XEvent *e) } void -pushdown(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; - } - focus(sel); - arrange(selmon); -} - -void -pushup(const Arg *arg) { - Client *sel = selmon->sel, *c; - - if(!sel || sel->isfloating) - return; - if((c = prevtiled(sel)) && c != nexttiled(selmon->clients)) { - detach(sel); - sel->next = c; - for(c = selmon->clients; c->next != sel->next; c = c->next); - c->next = sel; - } - focus(sel); - arrange(selmon); -} - -void quit(const Arg *arg) { running = 0; @@ -158,7 +158,6 @@ struct Monitor { int by; /* bar geometry */ int mx, my, mw, mh; /* screen size */ int wx, wy, ww, wh; /* window area */ - int gappx; /* gaps between windows */ unsigned int seltags; unsigned int sellt; unsigned int tagset[2]; @@ -253,7 +252,6 @@ static void sendmon(Client *c, Monitor *m); static void setclientstate(Client *c, long state); static void setfocus(Client *c); static void setfullscreen(Client *c, int fullscreen); -static void setgaps(const Arg *arg); static void setlayout(const Arg *arg); static void setmfact(const Arg *arg); static void setup(void); @@ -816,7 +814,6 @@ createmon(void) m->nmaster = nmaster; m->showbar = showbar; m->topbar = topbar; - m->gappx = gappx; m->lt[0] = &layouts[0]; m->lt[1] = &layouts[1 % LENGTH(layouts)]; strncpy(m->ltsymbol, layouts[0].symbol, sizeof m->ltsymbol); @@ -1815,16 +1812,6 @@ setfullscreen(Client *c, int fullscreen) } void -setgaps(const Arg *arg) -{ - if ((arg->i == 0) || (selmon->gappx + arg->i < 0)) - selmon->gappx = 0; - else - selmon->gappx += arg->i; - arrange(selmon); -} - -void setlayout(const Arg *arg) { if (!arg || !arg->v || arg->v != selmon->lt[selmon->sellt]) @@ -2023,18 +2010,18 @@ tile(Monitor *m) if (n > m->nmaster) mw = m->nmaster ? m->ww * m->mfact : 0; else - mw = m->ww - m->gappx; - for (i = 0, my = ty = m->gappx, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) - if (i < m->nmaster) { - h = (m->wh - my) / (MIN(n, m->nmaster) - i) - m->gappx; - resize(c, m->wx + m->gappx, m->wy + my, mw - (2*c->bw) - m->gappx, h - (2*c->bw), 0); - if (my + HEIGHT(c) + m->gappx < m->wh) - my += HEIGHT(c) + m->gappx; + mw = m->ww; + for (i = my = ty = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) + if (i < m->nmaster) { + h = (m->wh - my) / (MIN(n, m->nmaster) - i); + resize(c, m->wx, m->wy + my, mw - (2*c->bw), h - (2*c->bw), 0); + if (my + HEIGHT(c) < m->wh) + my += HEIGHT(c); } else { - h = (m->wh - ty) / (n - i) - m->gappx; - resize(c, m->wx + mw + m->gappx, m->wy + ty, m->ww - mw - (2*c->bw) - 2*m->gappx, h - (2*c->bw), 0); - if (ty + HEIGHT(c) + m->gappx < m->wh) - ty += HEIGHT(c) + m->gappx; + h = (m->wh - ty) / (n - i); + resize(c, m->wx + mw, m->wy + ty, m->ww - mw - (2*c->bw), h - (2*c->bw), 0); + if (ty + HEIGHT(c) < m->wh) + ty += HEIGHT(c); } } |
