sites

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

commit b846736462478fca6d63a4fad1fb851ba8b57b50
parent 653aa82dfc81c2b7fcc0579a4c7b2a4d883b0d0e
Author: Valentin <a-hg@0au.de>
Date:   Sat,  4 Jul 2009 19:33:21 +0200

Updated gaplessgrid, added moveontagmon to patches
Diffstat:
Adwm.suckless.org/patches/dwm-r1437-gaplessgrid.diff | 59+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adwm.suckless.org/patches/dwm-r1437-moveontagmon.diff | 14++++++++++++++
Mdwm.suckless.org/patches/gapless_grid.md | 2++
Adwm.suckless.org/patches/moveontagmon.md | 13+++++++++++++
4 files changed, 88 insertions(+), 0 deletions(-)

diff --git a/dwm.suckless.org/patches/dwm-r1437-gaplessgrid.diff b/dwm.suckless.org/patches/dwm-r1437-gaplessgrid.diff @@ -0,0 +1,59 @@ +diff -up dwm-5.2-original/config.def.h dwm-5.2-modified/config.def.h +--- dwm-5.2-original/config.def.h 2008-09-09 21:46:17.000000000 +0200 ++++ dwm-5.2-modified/config.def.h 2008-10-20 20:07:42.000000000 +0200 +@@ -28,11 +28,13 @@ static Rule rules[] = { + static float mfact = 0.55; /* factor of master area size [0.05..0.95] */ + static Bool resizehints = True; /* False means respect size hints in tiled resizals */ + ++#include "gaplessgrid.c" + static Layout layouts[] = { + /* symbol arrange function */ + { "[]=", tile }, /* first entry is default */ + { "><>", NULL }, /* no layout function means floating behavior */ + { "[M]", monocle }, ++ { "###", gaplessgrid }, + }; + + /* key definitions */ +diff -up dwm-5.2-original/gaplessgrid.c dwm-5.2-modified/gaplessgrid.c +--- /dev/null 2008-10-20 20:09:51.000000000 +0200 ++++ dwm-5.2-modified/gaplessgrid.c 2008-10-20 20:06:59.000000000 +0200 +@@ -0,0 +1,38 @@ ++void ++gaplessgrid(Monitor *m) { ++ unsigned int n, cols, rows, cn, rn, i, cx, cy, cw, ch; ++ Client *c; ++ ++ for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next)) ++ n++; ++ if(n == 0) ++ return; ++ ++ /* grid dimensions */ ++ for(cols = 0; cols <= n/2; cols++) ++ if(cols*cols >= n) ++ break; ++ if(n == 5) /* set layout against the general calculation: not 1:2:2, but 2:3 */ ++ cols = 2; ++ rows = n/cols; ++ ++ /* window geometries (cell height/width/x/y) */ ++ cw = m->ww / (cols ? cols : 1); ++ cn = 0; /* current column number */ ++ rn = 0; /* current row number */ ++ for(i = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next)) { ++ if(i/rows+1 > cols-n%cols) ++ rows = n/cols+1; ++ ch = m->wh / (rows ? rows : 1); ++ cx = m->wx + cn*cw; ++ cy = m->wy + rn*ch; ++ resize(c, cx, cy, cw - 2 * c->bw, ch - 2 * c->bw); ++ ++ i++; ++ rn++; ++ if(rn >= rows) { /* jump to the next column */ ++ rn = 0; ++ cn++; ++ } ++ } ++} diff --git a/dwm.suckless.org/patches/dwm-r1437-moveontagmon.diff b/dwm.suckless.org/patches/dwm-r1437-moveontagmon.diff @@ -0,0 +1,14 @@ +diff -r bb00510a176a dwm.c +--- a/dwm.c Wed Jul 01 19:15:20 2009 +0100 ++++ b/dwm.c Sat Jul 04 00:54:19 2009 +0200 +@@ -1530,6 +1530,10 @@ + + if(!selmon->sel || !(m = idxtomon(arg->ui))) + return; ++ if(selmon->sel->isfloating) { ++ selmon->sel->x += m->mx - selmon->mx; ++ selmon->sel->y += m->my - selmon->my; ++ } + sendmon(selmon->sel, m); + } + diff --git a/dwm.suckless.org/patches/gapless_grid.md b/dwm.suckless.org/patches/gapless_grid.md @@ -25,8 +25,10 @@ Comment: There may be problems applying the patch, if another layout has been ad ## Download ## * [dwm-5.2-gaplessgrid.diff][2] (1.9k) (20081020) + * [dwm-r1437-gaplessgrid.diff][3] (1.9k) (20090704) [1]: /dwm/patches/gridmode.html [2]: http://dwm.suckless.org/patches/dwm-5.2-gaplessgrid.diff +[3]: http://dwm.suckless.org/patches/dwm-r1437-gaplessgrid.diff diff --git a/dwm.suckless.org/patches/moveontagmon.md b/dwm.suckless.org/patches/moveontagmon.md @@ -0,0 +1,13 @@ +# FLOAT BORDER COLOR # + +## Description ## + +This patch moves floating windows if their monitor gets changed. + +## Download ## + * [dwm-r1437-moveontagmon.diff][1] + +## Author ## + * Apo - a-p@0au.de + +[1]: http://dwm.suckless.org/patches/dwm-r1437-moveontagmon.diff