[wiki] [sites] wiki updated

From: <hg_AT_suckless.org>
Date: Thu, 8 Jul 2010 21:06:23 +0000 (UTC)

changeset: 585:469b087648af
tag: tip
user: Donald Allen <donaldcallen_AT_gmail.com>
date: Thu Jul 08 17:05:41 2010 -0400
files: dwm.suckless.org/patches/bottom_stack.md dwm.suckless.org/patches/dwm-5.8.2-bstack-alt.diff
description:
List both standard and alternate versions of this patch. The alternate will work with pertag, whereas the standard version will not.


diff -r ec7a506a7476 -r 469b087648af dwm.suckless.org/patches/bottom_stack.md
--- a/dwm.suckless.org/patches/bottom_stack.md Thu Jul 08 00:58:19 2010 -0700
+++ b/dwm.suckless.org/patches/bottom_stack.md Thu Jul 08 17:05:41 2010 -0400
_AT_@ -30,5 +30,6 @@
 
 Download
 --------
-* [dwm-5.8.2-bstack.diff](dwm-5.8.2-bstack.diff)
+* Not for use with pertag patch: [dwm-5.8.2-bstack.diff](dwm-5.8.2-bstack.diff)
+* For use with pertag patch: [dwm-5.8.2-bstack-alt.diff](dwm-5.8.2-bstack-alt.diff)
 * see older versions in [historical patches](historical)
diff -r ec7a506a7476 -r 469b087648af dwm.suckless.org/patches/dwm-5.8.2-bstack-alt.diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dwm.suckless.org/patches/dwm-5.8.2-bstack-alt.diff Thu Jul 08 17:05:41 2010 -0400
_AT_@ -0,0 +1,93 @@
+diff -up dwm-5.8.2-original/config.def.h dwm-5.8.2/config.def.h
+--- dwm-5.8.2-original/config.def.h 2010-06-04 06:39:15.000000000 -0400
++++ dwm-5.8.2/config.def.h 2010-07-07 14:56:15.000000000 -0400
+_AT_@ -31,6 +31,8 @@ static const Layout layouts[] = {
+ { "[]=", tile }, /* first entry is default */
+ { "><>", NULL }, /* no layout function means floating behavior */
+ { "[M]", monocle },
++ { "TTT", bstack },
++ { "===", bstackhoriz },
+ };
+
+ /* key definitions */
+diff -up dwm-5.8.2-original/dwm.c dwm-5.8.2/dwm.c
+--- dwm-5.8.2-original/dwm.c 2010-06-04 06:39:15.000000000 -0400
++++ dwm-5.8.2/dwm.c 2010-07-07 15:03:16.000000000 -0400
+_AT_@ -158,6 +158,8 @@ static void arrange(Monitor *m);
+ static void arrangemon(Monitor *m);
+ static void attach(Client *c);
+ static void attachstack(Client *c);
++static void bstack(Monitor *m);
++static void bstackhoriz(Monitor *m);
+ static void buttonpress(XEvent *e);
+ static void checkotherwm(void);
+ static void cleanup(void);
+_AT_@ -1657,6 +1659,67 @@ tile(Monitor *m) {
+ if(h < bh)
+ h = m->wh;
+ for(i = 0, c = nexttiled(c->next); c; c = nexttiled(c->next), i++) {
++ resize(c, x, y, w - 2 * c->bw, /* remainder */ ((i + 1 == n)
++ ? m->wy + m->wh - y - 2 * c->bw : h - 2 * c->bw), False);
++ if(h != m->wh)
++ y = c->y + HEIGHT(c);
++ }
++}
++
++static void
++bstack(Monitor *m) {
++ int x, y, h, w, mh;
++ unsigned int i, n;
++ Client *c;
++
++ for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
++ if(n == 0)
++ return;
++ /* master */
++ c = nexttiled(m->clients);
++ mh = m->mfact * m->wh;
++ resize(c, m->wx, m->wy, m->ww - 2 * c->bw, (n == 1 ? m->wh : mh) - 2 * c->bw, False);
++ if(--n == 0)
++ return;
++ /* tile stack */
++ x = m->wx;
++ y = (m->wy + mh > c->y + c->h) ? c->y + c->h + 2 * c->bw : m->wy + mh;
++ w = m->ww / n;
++ h = (m->wy + mh > c->y + c->h) ? m->wy + m->wh - y : m->wh - mh;
++ if(w < bh)
++ w = m->ww;
++ for(i = 0, c = nexttiled(c->next); c; c = nexttiled(c->next), i++) {
++ resize(c, x, y, /* remainder */ ((i + 1 == n)
++ ? m->wx + m->ww - x - 2 * c->bw : w - 2 * c->bw), h - 2 * c->bw, False);
++ if(w != m->ww)
++ x = c->x + WIDTH(c);
++ }
++}
++
++static void
++bstackhoriz(Monitor *m) {
++ int x, y, h, w, mh;
++ unsigned int i, n;
++ Client *c;
++
++ for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
++ if(n == 0)
++ return;
++ /* master */
++ c = nexttiled(m->clients);
++ mh = m->mfact * m->wh;
++ resize(c, m->wx, m->wy, m->ww - 2 * c->bw, (n == 1 ? m->wh : mh) - 2 * c->bw, False);
++ if(--n == 0)
++ return;
++ /* tile stack */
++ x = m->wx;
++ y = (m->wy + mh > c->y + c->h) ? c->y + c->h + 2 * c->bw : m->wy + mh;
++ w = m->ww;
++ h = (m->wy + mh > c->y + c->h) ? m->wy + m->wh - y : m->wh - mh;
++ h /= n;
++ if(h < bh)
++ h = m->wh;
++ for(i = 0, c = nexttiled(c->next); c; c = nexttiled(c->next), i++) {
+ resize(c, x, y, w - 2 * c->bw, /* remainder */ ((i + 1 == n)
+ ? m->wy + m->wh - y - 2 * c->bw : h - 2 * c->bw), False);
+ if(h != m->wh)
+
Received on Thu Jul 08 2010 - 23:06:23 CEST

This archive was generated by hypermail 2.3.0 : Thu Sep 13 2012 - 19:31:22 CEST