[wiki] [sites] wiki updated

From: <hg_AT_suckless.org>
Date: Wed, 16 Jun 2010 02:41:19 +0000 (UTC)

changeset: 558:afb6c7d193a9
tag: tip
user: Andrew Antle <andrew_AT_antlechrist.org>
date: Tue Jun 15 22:40:03 2010 -0400
files: dwm.suckless.org/patches/dwm-5.8.2-gridmode.diff dwm.suckless.org/patches/gridmode.md
description:
Added new gridmode.diff .


diff -r 7ce958c98b75 -r afb6c7d193a9 dwm.suckless.org/patches/dwm-5.8.2-gridmode.diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dwm.suckless.org/patches/dwm-5.8.2-gridmode.diff Tue Jun 15 22:40:03 2010 -0400
_AT_@ -0,0 +1,43 @@
+diff -r 62791cc97f88 config.def.h
+--- a/config.def.h Tue Jun 01 17:39:26 2010 +0100
++++ b/config.def.h Wed Jun 02 13:42:49 2010 +0100
+_AT_@ -29,1 +29,2 @@
++#include "grid.c"
+ static const Layout layouts[] = {
+_AT_@ -34,3 +35,4 @@
++ { "HHH", grid },
+ };
+
+ /* key definitions */
+diff -r 62791cc97f88 grid.c
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/grid.c Wed Jun 02 13:42:49 2010 +0100
+_AT_@ -0,0 +1,28 @@
++void
++grid(Monitor *m) {
++ unsigned int i, n, cx, cy, cw, ch, aw, ah, cols, rows;
++ Client *c;
++
++ for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next))
++ n++;
++
++ /* grid dimensions */
++ for(rows = 0; rows <= n/2; rows++)
++ if(rows*rows >= n)
++ break;
++ cols = (rows && (rows - 1) * rows >= n) ? rows - 1 : rows;
++
++ /* window geoms (cell height/width) */
++ ch = m->wh / (rows ? rows : 1);
++ cw = m->ww / (cols ? cols : 1);
++ for(i = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next)) {
++ cx = m->wx + (i / rows) * cw;
++ cy = m->wy + (i % rows) * ch;
++ /* adjust height/width of last row/column's windows */
++ ah = ((i + 1) % rows == 0) ? m->wh - ch * rows : 0;
++ aw = (i >= rows * (cols - 1)) ? m->ww - cw * cols : 0;
++ resize(c, cx, cy, cw - 2 * c->bw + aw, ch - 2 * c->bw + ah, False);
++ i++;
++ }
++}
++
diff -r 7ce958c98b75 -r afb6c7d193a9 dwm.suckless.org/patches/gridmode.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dwm.suckless.org/patches/gridmode.md Tue Jun 15 22:40:03 2010 -0400
_AT_@ -0,0 +1,26 @@
+GRIDMODE
+========
+
+Description
+-----------
+This patch adds an extra layout mode to dwm called `grid` in which the windows
+are arranged in a grid of equal sizes. It comes in very handy, especially with
+tools that operate on multiple windows at once; e.g. Cluster SSH.
+
+Download
+--------
+* [dwm-5.8.2-gridmode.diff](dwm-5.8.2-gridmode.diff)
+* See older versions in [historical](historical/gridmode).
+
+Authors
+-------
+* Alexandru E. Ungur - `<grid at rb.no-ip dot biz>`
+* Updated by Jan Christoph Ebersbach - `<jceb at e-jc dot de>`
+* Updated to 5.2 & small fix by V4hn - `v4hn.de`
+
+Feedback is more than welcome :-)
+
+Acknowledgements
+----------------
+The patch would look a lot uglier without Jukka Salmi's constant help.
+Thanks Jukka :-)
Received on Wed Jun 16 2010 - 04:41:19 CEST

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