sites

public wiki contents of suckless.org
git clone git://git.suckless.org/sites
Log | Files | Refs

commit 6187074fd99d639d5575b11b39c5058f367068e6
parent 17f3730a7be21391787379229f0a1e99c4aebf5c
Author: Britton Leo Kerin <britton.kerin@gmail.com>
Date:   Fri, 15 Jul 2016 14:13:42 -0800

Replace original version with newer one...

... as per the instructions of the author of the original version.

Diffstat:
Mdwm.suckless.org/patches/columns.md | 25++++++++-----------------
Rdwm.suckless.org/patches/dwm-6.0-column_master.diff -> dwm.suckless.org/patches/dwm-columns-6.0.diff | 0
Ddwm.suckless.org/patches/dwm-r1580-col.diff | 60------------------------------------------------------------
3 files changed, 8 insertions(+), 77 deletions(-)

diff --git a/dwm.suckless.org/patches/columns.md b/dwm.suckless.org/patches/columns.md @@ -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@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@gmail.com> diff --git a/dwm.suckless.org/patches/dwm-6.0-column_master.diff b/dwm.suckless.org/patches/dwm-columns-6.0.diff diff --git a/dwm.suckless.org/patches/dwm-r1580-col.diff b/dwm.suckless.org/patches/dwm-r1580-col.diff @@ -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 -@@ -32,6 +32,7 @@ - { "[]=", tile }, /* first entry is default */ - { "><>", NULL }, /* no layout function means floating behavior */ - { "[M]", monocle }, -+ { "|||", col }, - }; - - /* key definitions */ -@@ -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 -@@ -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); -@@ -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;