[wiki] [sandbox.suckless.org] Updated gaplessgrid, added moveontagmon to patches || Valentin

From: <hg_AT_suckless.org>
Date: Sat, 4 Jul 2009 18:33:58 +0100 (BST)

changeset: 127:399e0161f46d
tag: tip
user: Valentin <a-hg_AT_0au.de>
date: Sat Jul 04 19:33:21 2009 +0200
files: dwm.suckless.org/patches/dwm-r1437-gaplessgrid.diff dwm.suckless.org/patches/dwm-r1437-moveontagmon.diff dwm.suckless.org/patches/gapless_grid.md dwm.suckless.org/patches/moveontagmon.md
description:
Updated gaplessgrid, added moveontagmon to patches


diff -r 3d62731d8117 -r 399e0161f46d dwm.suckless.org/patches/dwm-r1437-gaplessgrid.diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dwm.suckless.org/patches/dwm-r1437-gaplessgrid.diff Sat Jul 04 19:33:21 2009 +0200
_AT_@ -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
+_AT_@ -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
+_AT_@ -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 -r 3d62731d8117 -r 399e0161f46d dwm.suckless.org/patches/dwm-r1437-moveontagmon.diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dwm.suckless.org/patches/dwm-r1437-moveontagmon.diff Sat Jul 04 19:33:21 2009 +0200
_AT_@ -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
+_AT_@ -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 -r 3d62731d8117 -r 399e0161f46d dwm.suckless.org/patches/gapless_grid.md
--- a/dwm.suckless.org/patches/gapless_grid.md Sun Jun 28 13:22:58 2009 +0100
+++ b/dwm.suckless.org/patches/gapless_grid.md Sat Jul 04 19:33:21 2009 +0200
_AT_@ -25,8 +25,10 @@
 ## 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 -r 3d62731d8117 -r 399e0161f46d dwm.suckless.org/patches/moveontagmon.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dwm.suckless.org/patches/moveontagmon.md Sat Jul 04 19:33:21 2009 +0200
_AT_@ -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_AT_0au.de
+
+[1]: http://dwm.suckless.org/patches/dwm-r1437-moveontagmon.diff
Received on Sat Jul 04 2009 - 19:33:58 CEST

This archive was generated by hypermail 2.3.0 : Thu Sep 13 2012 - 19:30:40 CEST