[wiki] [sites] wiki updated

From: <hg_AT_suckless.org>
Date: Fri, 7 Jan 2011 14:41:51 +0000 (UTC)

changeset: 671:144a6daa02d7
tag: tip
user: Jerome Andrieux <jerome_AT_gcu.info>
date: Fri Jan 07 15:41:35 2011 +0100
files: dwm.suckless.org/patches/bottom_stack.md dwm.suckless.org/patches/dwm-5.9-bstack-alt.diff dwm.suckless.org/patches/dwm-5.9-bstack.diff dwm.suckless.org/patches/dwm-5.9-uselessgap.diff dwm.suckless.org/patches/uselessgap.md
description:
Updated patches and doc for uselessgap and bstack with 5.9


diff -r 35c64965a7ba -r 144a6daa02d7 dwm.suckless.org/patches/bottom_stack.md
--- a/dwm.suckless.org/patches/bottom_stack.md Mon Jan 03 20:14:32 2011 -0500
+++ b/dwm.suckless.org/patches/bottom_stack.md Fri Jan 07 15:41:35 2011 +0100
_AT_@ -33,3 +33,8 @@
 * 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)
+
+5.9 (20110107) :
+* Not for use with pertag patch: [dwm-5.9-bstack.diff](dwm-5.9-bstack.diff)
+* For use with pertag patch: [dwm-5.9-bstack-alt.diff](dwm-5.9-bstack-alt.diff)
+
diff -r 35c64965a7ba -r 144a6daa02d7 dwm.suckless.org/patches/dwm-5.9-bstack-alt.diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dwm.suckless.org/patches/dwm-5.9-bstack-alt.diff Fri Jan 07 15:41:35 2011 +0100
_AT_@ -0,0 +1,98 @@
+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[] = {
+ /* symbol arrange function */
+ { "[]=", tile }, /* first entry is default */
+ { "><>", NULL }, /* no layout function means floating behavior */
+ { "[M]", monocle },
++ { "TTT", bstack },
++ { "===", bstackhoriz },
+ };
+
+ /* key definitions */
+ #define MODKEY Mod1Mask
+ #define TAGKEYS(KEY,TAG) \
+ };
+
+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)
+
diff -r 35c64965a7ba -r 144a6daa02d7 dwm.suckless.org/patches/dwm-5.9-bstack.diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dwm.suckless.org/patches/dwm-5.9-bstack.diff Fri Jan 07 15:41:35 2011 +0100
_AT_@ -0,0 +1,87 @@
+diff -NU5 -r dwm-5.8.2/bstack.c dwm-5.8.2-bstack/bstack.c
+--- dwm-5.8.2/bstack.c 1970-01-01 01:00:00.000000000 +0100
++++ dwm-5.8.2-bstack/bstack.c 2010-06-15 17:47:44.000000000 +0200
+_AT_@ -0,0 +1,29 @@
++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);
++ }
++}
+diff -NU5 -r dwm-5.8.2/bstackhoriz.c dwm-5.8.2-bstack/bstackhoriz.c
+--- dwm-5.8.2/bstackhoriz.c 1970-01-01 01:00:00.000000000 +0100
++++ dwm-5.8.2-bstack/bstackhoriz.c 2010-06-15 17:47:44.000000000 +0200
+_AT_@ -0,0 +1,30 @@
++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)
++ y = c->y + HEIGHT(c);
++ }
++}
+
+diff -r 23b71491e149 config.def.h
+--- a/config.def.h Thu Dec 02 10:16:47 2010 +0000
++++ b/config.def.h Fri Jan 07 15:10:06 2011 +0100
+_AT_@ -26,11 +26,15 @@
+ static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */
+ static const Bool resizehints = True; /* True means respect size hints in tiled resizals */
+
++#include "bstack.c"
++#include "bstackhoriz.c"
+ static const Layout layouts[] = {
+ /* symbol arrange function */
+ { "[]=", tile }, /* first entry is default */
+ { "><>", NULL }, /* no layout function means floating behavior */
+ { "[M]", monocle },
++ { "TTT", bstack },
++ { "===", bstackhoriz },
+ };
+
+ /* key definitions */
diff -r 35c64965a7ba -r 144a6daa02d7 dwm.suckless.org/patches/dwm-5.9-uselessgap.diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dwm.suckless.org/patches/dwm-5.9-uselessgap.diff Fri Jan 07 15:41:35 2011 +0100
_AT_@ -0,0 +1,45 @@
+diff -r 23b71491e149 config.def.h
+--- a/config.def.h Thu Dec 02 10:16:47 2010 +0000
++++ b/config.def.h Fri Jan 07 08:50:42 2011 +0100
+_AT_@ -9,6 +9,7 @@
+ static const char selbgcolor[] = "#0066ff";
+ static const char selfgcolor[] = "#ffffff";
+ static const unsigned int borderpx = 1; /* border pixel of windows */
++static const unsigned int gappx = 6; /* gap pixel between windows */
+ static const unsigned int snap = 32; /* snap pixel */
+ static const Bool showbar = True; /* False means no bar */
+ static const Bool topbar = True; /* False means bottom bar */
+diff -r 23b71491e149 dwm.c
+--- a/dwm.c Thu Dec 02 10:16:47 2010 +0000
++++ b/dwm.c Fri Jan 07 08:50:42 2011 +0100
+_AT_@ -273,6 +273,8 @@
+ static DC dc;
+ static Monitor *mons = NULL, *selmon = NULL;
+ static Window root;
++static int globalborder ;
++static int globalborder ;
+
+ /* configuration, allows nested code to access above variables */
+ #include "config.h"
+_AT_@ -1329,11 +1331,17 @@
+ void
+ resizeclient(Client *c, int x, int y, int w, int h) {
+ XWindowChanges wc;
++
++ if(c->isfloating || selmon->lt[selmon->sellt]->arrange == NULL) { globalborder = 0 ; }
++ else {
++ if (selmon->lt[selmon->sellt]->arrange == monocle) { globalborder = 0 - borderpx ; }
++ else { globalborder = gappx ; }
++ }
+
+- c->oldx = c->x; c->x = wc.x = x;
+- c->oldy = c->y; c->y = wc.y = y;
+- c->oldw = c->w; c->w = wc.width = w;
+- c->oldh = c->h; c->h = wc.height = h;
++ c->oldx = c->x; c->x = wc.x = x + globalborder ;
++ c->oldy = c->y; c->y = wc.y = y + globalborder ;
++ c->oldw = c->w; c->w = wc.width = w - 2 * globalborder ;
++ c->oldh = c->h; c->h = wc.height = h - 2 * globalborder ;
+ wc.border_width = c->bw;
+ XConfigureWindow(dpy, c->win, CWX|CWY|CWWidth|CWHeight|CWBorderWidth, &wc);
+ configure(c);
diff -r 35c64965a7ba -r 144a6daa02d7 dwm.suckless.org/patches/uselessgap.md
--- a/dwm.suckless.org/patches/uselessgap.md Mon Jan 03 20:14:32 2011 -0500
+++ b/dwm.suckless.org/patches/uselessgap.md Fri Jan 07 15:41:35 2011 +0100
_AT_@ -33,6 +33,10 @@
 
 ## Download
 
+ * [dwm-5.9-uselessgap.diff](dwm-5.9-uselessgap.dif) (0.7K) (20110107 updated. Thanks Jordan for your bug report)
+
+ Update to use the new resizeclient() function instead of resize()
+
  * [dwm-uselessgap-5.8.diff](dwm-uselessgap-5.8.diff) (0.7K) (20100225 updated. Thanks Guillaume for your bug report)
    
         Fix floating clients bug and remove all borders in monocle mode.
Received on Fri Jan 07 2011 - 15:41:51 CET

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