[wiki] [sites] new layout: deck || Unia

From: <git_AT_suckless.org>
Date: Sat, 23 Mar 2013 17:20:24 +0100

commit bfc10146f27dd1cf0a407e8505cb0c2fed813ac5
Author: Unia <jthidskes_AT_live.nl>
Date: Sat Mar 23 17:20:38 2013 +0100

    new layout: deck

diff --git a/dwm.suckless.org/patches/deck.md b/dwm.suckless.org/patches/deck.md
new file mode 100644
index 0000000..b98ffb5
--- /dev/null
+++ b/dwm.suckless.org/patches/deck.md
_AT_@ -0,0 +1,38 @@
+\singular borders
+===========
+
+Description
+-----------
+`deck` is a new layout for DWM (inspired by the TTWM window manager). It is like tile(), but with monocle in the stack. You have a master client (complete with nmaster et all), but the stack clients now overlap one another as in monocle(). (The stacked clients are like a deck of cards, hence the name).
+
+
+ Tile :
+ +-----------------+--------+
+ | | |
+ | | S1 |
+ | | |
+ | M +--------+
+ | | |
+ | | S2 |
+ | | |
+ +-----------------+--------+
+
+
+ Deck :
+ +-----------------+--------+
+ | | |
+ | | |
+ | | |
+ | M | S1 |
+ | | |
+ | | |
+ | | |
+ +-----------------+--------+
+
+Download
+--------
+* [dwm-6.0-deck.diff](dwm-6.0-deck.diff)
+
+Author
+------
+* Jente Hidskes - `<jthidskes at outlook dot com>`
diff --git a/dwm.suckless.org/patches/dwm-6.0-deck.diff b/dwm.suckless.org/patches/dwm-6.0-deck.diff
new file mode 100644
index 0000000..fb9155c
--- /dev/null
+++ b/dwm.suckless.org/patches/dwm-6.0-deck.diff
_AT_@ -0,0 +1,44 @@
+--- dwm.c.orig 2011-12-19 16:02:46.000000000 +0100
++++ dwm.c 2013-03-23 17:19:43.676517546 +0100
+_AT_@ -171,6 +171,7 @@
+ static void configurenotify(XEvent *e);
+ static void configurerequest(XEvent *e);
+ static Monitor *createmon(void);
++static void deck(Monitor *m);
+ static void destroynotify(XEvent *e);
+ static void detach(Client *c);
+ static void detachstack(Client *c);
+_AT_@ -661,6 +662,33 @@
+ }
+
+ void
++deck(Monitor *m) {
++ unsigned int i, n, dn, h, mw, my;
++ Client *c;
++
++ for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
++ if(n == 0)
++ return;
++
++ dn = n - 1;
++ if(dn > 0) /* override layout symbol */
++ snprintf(m->ltsymbol, sizeof m->ltsymbol, "D %d", dn);
++
++ if(n > m->nmasters[m->curtag])
++ mw = m->nmasters[m->curtag] ? m->ww * m->mfacts[m->curtag] : 0;
++ else
++ mw = m->ww;
++ for(i = my = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++)
++ if(i < m->nmasters[m->curtag]) {
++ h = (m->wh - my) / (MIN(n, m->nmasters[m->curtag]) - i);
++ resize(c, m->wx, m->wy + my, mw - (2*c->bw), h - (2*c->bw), False);
++ my += HEIGHT(c);
++ }
++ else
++ resize(c, m->wx + mw, m->wy, m->ww - mw - (2*c->bw), m->wh - (2*c->bw), False);
++}
++
++void
+ destroynotify(XEvent *e) {
+ Client *c;
+ XDestroyWindowEvent *ev = &e->xdestroywindow;
Received on Sat Mar 23 2013 - 17:20:24 CET

This archive was generated by hypermail 2.3.0 : Sat Mar 23 2013 - 17:24:06 CET