sites

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

commit d10f6bc1d0b2ea2e073d743b4334c556eab12595
parent fa0f77ab001f8ebc684757873ed5dfd814e1de44
Author: Miles Alan <m@milesalan.com>
Date:   Mon, 17 Aug 2020 21:21:20 -0500

[dwm][patch] deck: Add doubledeck patch variant which creates 2 deck areas

Diffstat:
Adwm.suckless.org/patches/deck/dwm-deck-double-6.2.diff | 76++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mdwm.suckless.org/patches/deck/index.md | 9+++++++++
2 files changed, 85 insertions(+), 0 deletions(-)

diff --git a/dwm.suckless.org/patches/deck/dwm-deck-double-6.2.diff b/dwm.suckless.org/patches/deck/dwm-deck-double-6.2.diff @@ -0,0 +1,76 @@ +From c29cee8186c9a8d117a128b6848afb08035961c1 Mon Sep 17 00:00:00 2001 +From: Miles Alan <m@milesalan.com> +Date: Mon, 17 Aug 2020 20:57:03 -0500 +Subject: [PATCH] Add doubledeck layout function and bind to MOD+r + +The doubledeck layout is like the deck layout, which stacks clients one ontop +of another in the stack area, however the doubledeck variant additionally +stacks clients one ontop of eachother in the master area. +--- + config.def.h | 2 ++ + dwm.c | 22 ++++++++++++++++++++++ + 2 files changed, 24 insertions(+) + +diff --git a/config.def.h b/config.def.h +index 1c0b587..6538420 100644 +--- a/config.def.h ++++ b/config.def.h +@@ -41,6 +41,7 @@ static const Layout layouts[] = { + { "[]=", tile }, /* first entry is default */ + { "><>", NULL }, /* no layout function means floating behavior */ + { "[M]", monocle }, ++ { "DD", doubledeck }, + }; + + /* key definitions */ +@@ -76,6 +77,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_r, setlayout, {.v = &layouts[3]} }, + { MODKEY, XK_space, setlayout, {0} }, + { MODKEY|ShiftMask, XK_space, togglefloating, {0} }, + { MODKEY, XK_0, view, {.ui = ~0 } }, +diff --git a/dwm.c b/dwm.c +index 4465af1..ce29fb4 100644 +--- a/dwm.c ++++ b/dwm.c +@@ -161,6 +161,7 @@ static void destroynotify(XEvent *e); + static void detach(Client *c); + static void detachstack(Client *c); + static Monitor *dirtomon(int dir); ++static void doubledeck(Monitor *m); + static void drawbar(Monitor *m); + static void drawbars(void); + static void enternotify(XEvent *e); +@@ -692,6 +693,27 @@ dirtomon(int dir) + return m; + } + ++void ++doubledeck(Monitor *m) { ++ unsigned int i, n, 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 = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) ++ if(i < m->nmaster) ++ resize(c, m->wx, m->wy, mw - (2*c->bw), m->wh - (2*c->bw), False); ++ else ++ resize(c, m->wx + mw, m->wy, m->ww - mw - (2*c->bw), m->wh - (2*c->bw), False); ++} ++ + void + drawbar(Monitor *m) + { +-- +2.25.4 + diff --git a/dwm.suckless.org/patches/deck/index.md b/dwm.suckless.org/patches/deck/index.md @@ -21,6 +21,13 @@ This means that when the deck-layout is activated gaps are omitted. To make it work with the tilegap-patch apply the dwm-deck-tilegap patch on top of the dwm-deck patch. +deck-double +------------ +This patch variant adds a layout function named doubledeck which is +similar to the deck layout. However, rather then just creating a deck +area in the stack; it also creates a deck area in the master area. This +pairs nicely with the [bartabgroups](/patches/bartabgroups/) patch. + Showcase -------- @@ -51,9 +58,11 @@ Download * [dwm-deck-6.0.diff](dwm-deck-6.0.diff) * [dwm-deck-rmaster-6.1.diff](dwm-deck-rmaster-6.1.diff) * [dwm-deck-tilegap-6.1.diff](dwm-deck-tilegap-6.1.diff) +* [dwm-deck-double-6.2.diff](dwm-deck-double-6.2.diff) Author ------ * Jente Hidskes - `<jthidskes at outlook dot com>` * Joshua Haase - `<hahj87 at gmail dot com>` * Aleksandrs Stier +* Miles Alan - `<m at milesalan dot com>` (deck double patch)