[wiki] [sites] Replace original version with newer one... || Britton Leo Kerin
commit 6187074fd99d639d5575b11b39c5058f367068e6
Author: Britton Leo Kerin <britton.kerin_AT_gmail.com>
Date: Fri Jul 15 14:13:42 2016 -0800
Replace original version with newer one...
... as per the instructions of the author of the original version.
diff --git a/dwm.suckless.org/patches/columns.md b/dwm.suckless.org/patches/columns.md
index a23b765..2000e53 100644
--- a/dwm.suckless.org/patches/columns.md
+++ b/dwm.suckless.org/patches/columns.md
_AT_@ -3,27 +3,18 @@ columns
Description
-----------
-This patch adds an extra layout to dwm called `col` in which the windows are
-arranged in colums of equal size. The number of columns is always nmaster + 1,
-and the last column is a stack of leftover windows just like the normal tile
-layout.
+
+This patch adds an extra layout to dwm called `col` in which the windows in the
+master area are arranged in colums of equal size. The number of columns is
+always nmaster + 1, and the last column is a stack of leftover windows just
+like the normal tile layout. It effectively acts like the default tiling mode,
+except provides for vertical instead of horizontal master windows.
Download
--------
-* [dwm-r1580-col.diff](dwm-r1580-col.diff)
+* [dwm-columns-6.0.diff](dwm-columns-6.0.diff)
Author
------
* Evan Gates (emg)<evan.gates_AT_gmail.com>
-
-Special Version
----------------
-This patch tweaks the one above to respect the master width % (mfact in config.h)
-and resizings. So instead of the entire screen divided into even columns only
-the master portion is, with the remaining space becoming the last column for the
-stack. It effectively acts like the default tiling mode, except provides for
-vertical instead of horizontal master windows.
-
-* [dwm-6.0-column_master.diff](dwm-6.0-column_master.diff)
-
-* noah dot rosser gmail
+* Noah Rosser <noah.rosser_AT_gmail.com>
diff --git a/dwm.suckless.org/patches/dwm-6.0-column_master.diff b/dwm.suckless.org/patches/dwm-6.0-column_master.diff
deleted file mode 100644
index 934845b..0000000
--- a/dwm.suckless.org/patches/dwm-6.0-column_master.diff
+++ /dev/null
_AT_@ -1,63 +0,0 @@
-diff -up dwm_orig_src/config.def.h dwm-6.0/config.def.h
---- dwm_orig_src/config.def.h 2012-08-25 12:34:20.847202795 -0400
-+++ dwm-6.0/config.def.h 2012-08-25 11:58:15.210591031 -0400
-_AT_@ -32,6 +32,7 @@ static const Layout layouts[] = {
- { "[]=", tile }, /* first entry is default */
- { "><>", NULL }, /* no layout function means floating behavior */
- { "[M]", monocle },
-+ { "|||", col },
- };
-
- /* key definitions */
-_AT_@ -66,6 +67,7 @@ static Key keys[] = {
- { MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
- { MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
- { MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
-+ { MODKEY, XK_c, setlayout, {.v = &layouts[3]} },
- { MODKEY, XK_space, setlayout, {0} },
- { MODKEY|ShiftMask, XK_space, togglefloating, {0} },
- { MODKEY, XK_0, view, {.ui = ~0 } },
-diff -up dwm_orig_src/dwm.c dwm-6.0/dwm.c
---- dwm_orig_src/dwm.c 2012-08-25 12:34:20.847202795 -0400
-+++ dwm-6.0/dwm.c 2012-08-25 12:05:54.180592952 -0400
-_AT_@ -167,6 +167,7 @@ static void cleanup(void);
- static void cleanupmon(Monitor *mon);
- static void clearurgent(Client *c);
- static void clientmessage(XEvent *e);
-+static void col(Monitor *);
- static void configure(Client *c);
- static void configurenotify(XEvent *e);
- static void configurerequest(XEvent *e);
-_AT_@ -1702,6 +1703,32 @@ textnw(const char *text, unsigned int le
- }
-
- void
-+col(Monitor *m) {
-+ unsigned int i, n, h, w, x, y,mw;
-+ Client *c;
-+
-+ for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
-+ if(n == 0)
-+ return;
-+ if(n > m->nmaster)
-+ mw = m->nmaster ? m->ww * m->mfact : 0;
-+ else
-+ mw = m->ww;
-+ for(i = x = y = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) {
-+ if(i < m->nmaster) {
-+ w = (mw - x) / (MIN(n, m->nmaster)-i);
-+ resize(c, x + m->wx, m->wy, w - (2*c->bw), m->wh - (2*c->bw), False);
-+ x += WIDTH(c);
-+ }
-+ else {
-+ h = (m->wh - y) / (n - i);
-+ resize(c, x + m->wx, m->wy + y, m->ww - x - (2*c->bw), h - (2*c->bw), False);
-+ y += HEIGHT(c);
-+ }
-+ }
-+}
-+
-+void
- tile(Monitor *m) {
- unsigned int i, n, h, mw, my, ty;
- Client *c;
diff --git a/dwm.suckless.org/patches/dwm-columns-6.0.diff b/dwm.suckless.org/patches/dwm-columns-6.0.diff
new file mode 100644
index 0000000..934845b
--- /dev/null
+++ b/dwm.suckless.org/patches/dwm-columns-6.0.diff
_AT_@ -0,0 +1,63 @@
+diff -up dwm_orig_src/config.def.h dwm-6.0/config.def.h
+--- dwm_orig_src/config.def.h 2012-08-25 12:34:20.847202795 -0400
++++ dwm-6.0/config.def.h 2012-08-25 11:58:15.210591031 -0400
+_AT_@ -32,6 +32,7 @@ static const Layout layouts[] = {
+ { "[]=", tile }, /* first entry is default */
+ { "><>", NULL }, /* no layout function means floating behavior */
+ { "[M]", monocle },
++ { "|||", col },
+ };
+
+ /* key definitions */
+_AT_@ -66,6 +67,7 @@ static Key keys[] = {
+ { MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
+ { MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
+ { MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
++ { MODKEY, XK_c, setlayout, {.v = &layouts[3]} },
+ { MODKEY, XK_space, setlayout, {0} },
+ { MODKEY|ShiftMask, XK_space, togglefloating, {0} },
+ { MODKEY, XK_0, view, {.ui = ~0 } },
+diff -up dwm_orig_src/dwm.c dwm-6.0/dwm.c
+--- dwm_orig_src/dwm.c 2012-08-25 12:34:20.847202795 -0400
++++ dwm-6.0/dwm.c 2012-08-25 12:05:54.180592952 -0400
+_AT_@ -167,6 +167,7 @@ static void cleanup(void);
+ static void cleanupmon(Monitor *mon);
+ static void clearurgent(Client *c);
+ static void clientmessage(XEvent *e);
++static void col(Monitor *);
+ static void configure(Client *c);
+ static void configurenotify(XEvent *e);
+ static void configurerequest(XEvent *e);
+_AT_@ -1702,6 +1703,32 @@ textnw(const char *text, unsigned int le
+ }
+
+ void
++col(Monitor *m) {
++ unsigned int i, n, h, w, x, y,mw;
++ Client *c;
++
++ for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
++ if(n == 0)
++ return;
++ if(n > m->nmaster)
++ mw = m->nmaster ? m->ww * m->mfact : 0;
++ else
++ mw = m->ww;
++ for(i = x = y = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) {
++ if(i < m->nmaster) {
++ w = (mw - x) / (MIN(n, m->nmaster)-i);
++ resize(c, x + m->wx, m->wy, w - (2*c->bw), m->wh - (2*c->bw), False);
++ x += WIDTH(c);
++ }
++ else {
++ h = (m->wh - y) / (n - i);
++ resize(c, x + m->wx, m->wy + y, m->ww - x - (2*c->bw), h - (2*c->bw), False);
++ y += HEIGHT(c);
++ }
++ }
++}
++
++void
+ tile(Monitor *m) {
+ unsigned int i, n, h, mw, my, ty;
+ Client *c;
diff --git a/dwm.suckless.org/patches/dwm-r1580-col.diff b/dwm.suckless.org/patches/dwm-r1580-col.diff
deleted file mode 100644
index 85df9de..0000000
--- a/dwm.suckless.org/patches/dwm-r1580-col.diff
+++ /dev/null
_AT_@ -1,60 +0,0 @@
-diff -r cfcfa05033e3 config.def.h
---- a/config.def.h Fri Oct 28 23:45:12 2011 +0100
-+++ b/config.def.h Fri Oct 28 18:57:59 2011 -0700
-_AT_@ -32,6 +32,7 @@
- { "[]=", tile }, /* first entry is default */
- { "><>", NULL }, /* no layout function means floating behavior */
- { "[M]", monocle },
-+ { "|||", col },
- };
-
- /* key definitions */
-_AT_@ -66,6 +67,7 @@
- { MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
- { MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
- { MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
-+ { MODKEY, XK_c, setlayout, {.v = &layouts[3]} },
- { MODKEY, XK_space, setlayout, {0} },
- { MODKEY|ShiftMask, XK_space, togglefloating, {0} },
- { MODKEY, XK_0, view, {.ui = ~0 } },
-diff -r cfcfa05033e3 dwm.c
---- a/dwm.c Fri Oct 28 23:45:12 2011 +0100
-+++ b/dwm.c Fri Oct 28 18:57:59 2011 -0700
-_AT_@ -165,6 +165,7 @@
- static void cleanupmon(Monitor *mon);
- static void clearurgent(Client *c);
- static void clientmessage(XEvent *e);
-+static void col(Monitor *);
- static void configure(Client *c);
- static void configurenotify(XEvent *e);
- static void configurerequest(XEvent *e);
-_AT_@ -1658,6 +1659,29 @@
- }
-
- void
-+col(Monitor *m) {
-+ unsigned int i, n, h, w, x, y;
-+ Client *c;
-+
-+ for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
-+ if(n == 0)
-+ return;
-+
-+ for(i = x = y = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) {
-+ if(i < m->nmaster) {
-+ w = (m->ww - x) / (MIN(n, m->nmaster) + (n > m->nmaster) - i);
-+ resize(c, x + m->wx, m->wy, w - (2*c->bw), m->wh - (2*c->bw), False);
-+ x += WIDTH(c);
-+ }
-+ else {
-+ h = (m->wh - y) / (n - i);
-+ resize(c, x + m->wx, m->wy + y, m->ww - x - (2*c->bw), h - (2*c->bw), False);
-+ y += HEIGHT(c);
-+ }
-+ }
-+}
-+
-+void
- tile(Monitor *m) {
- unsigned int i, n, h, mw, my, ty;
- Client *c;
Received on Sat Jul 16 2016 - 00:14:29 CEST
This archive was generated by hypermail 2.3.0
: Sat Jul 16 2016 - 00:24:36 CEST