sites

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit e3a0337ec8fbdb8e16c50fa1daa526610aea49a1
parent f85fedcc15054d80bde1eb5555cb9fbd4d09a9c5
Author: Noah Rosser <noah.rosser@gmail.com>
Date:   Sun, 26 Aug 2012 11:19:55 -0400

adding new columns patch
Diffstat:
Mdwm.suckless.org/patches/columns.md | 12++++++++++++
Adwm.suckless.org/patches/dwm-6.0-column_master.diff | 63+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 75 insertions(+), 0 deletions(-)

diff --git a/dwm.suckless.org/patches/columns.md b/dwm.suckless.org/patches/columns.md @@ -15,3 +15,15 @@ Download 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 diff --git a/dwm.suckless.org/patches/dwm-6.0-column_master.diff b/dwm.suckless.org/patches/dwm-6.0-column_master.diff @@ -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 +@@ -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 */ +@@ -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 +@@ -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); +@@ -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;