aboutsummaryrefslogtreecommitdiff
path: root/patches/dwm-deck-tilegap-6.1.diff
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2024-04-18 14:11:55 +0100
committerAryadev Chavali <aryadev@aryadevchavali.com>2024-04-18 14:11:55 +0100
commitaabccefea1d4c8b5ffe6ad0dcdaac1612d502d92 (patch)
tree78870beb4f49860bfcc490ad9e99f07bf403fb9a /patches/dwm-deck-tilegap-6.1.diff
parentd1e0e1e8c69735a295c03654bf29f76071a9378e (diff)
downloaddwm-aabccefea1d4c8b5ffe6ad0dcdaac1612d502d92.tar.gz
dwm-aabccefea1d4c8b5ffe6ad0dcdaac1612d502d92.tar.bz2
dwm-aabccefea1d4c8b5ffe6ad0dcdaac1612d502d92.zip
Added patches folder
Diffstat (limited to 'patches/dwm-deck-tilegap-6.1.diff')
-rw-r--r--patches/dwm-deck-tilegap-6.1.diff55
1 files changed, 55 insertions, 0 deletions
diff --git a/patches/dwm-deck-tilegap-6.1.diff b/patches/dwm-deck-tilegap-6.1.diff
new file mode 100644
index 0000000..30b6e83
--- /dev/null
+++ b/patches/dwm-deck-tilegap-6.1.diff
@@ -0,0 +1,55 @@
+From a9e442ec18683e2255ffef74404c283bbb0b6381 Mon Sep 17 00:00:00 2001
+From: aleks <aleks.stier@icloud.com>
+Date: Thu, 23 May 2019 23:27:59 +0200
+Subject: [PATCH] Make deck-patch work with the tilegap-patch
+
+Apply this patch on top of the deck-patch to make it work with the
+tilegap-patch.
+---
+ dwm.c | 18 ++++++++++--------
+ 1 file changed, 10 insertions(+), 8 deletions(-)
+
+diff --git a/dwm.c b/dwm.c
+index 5b68242..1c17891 100644
+--- a/dwm.c
++++ b/dwm.c
+@@ -656,7 +656,7 @@ createmon(void)
+
+ void
+ deck(Monitor *m) {
+- unsigned int i, n, h, mw, my;
++ unsigned int i, n, h, mw, my, ns;
+ Client *c;
+
+ for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
+@@ -665,18 +665,20 @@ deck(Monitor *m) {
+
+ if(n > m->nmaster) {
+ mw = m->nmaster ? m->ww * m->mfact : 0;
++ ns = m->nmaster > 0 ? 2 : 1;
+ snprintf(m->ltsymbol, sizeof m->ltsymbol, "[%d]", n - m->nmaster);
+- }
+- else
++ } else {
+ mw = m->ww;
+- for(i = my = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++)
++ ns = 1;
++ }
++ for(i = 0, my = gappx, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++)
+ if(i < m->nmaster) {
+- h = (m->wh - my) / (MIN(n, m->nmaster) - i);
+- resize(c, m->wx, m->wy + my, mw - (2*c->bw), h - (2*c->bw), False);
+- my += HEIGHT(c);
++ h = (m->wh - my) / (MIN(n, m->nmaster) - i) - gappx;
++ resize(c, m->wx + gappx, m->wy + my, mw - (2*c->bw) - gappx*(5-ns)/2, h - (2*c->bw), False);
++ my += HEIGHT(c) + gappx;
+ }
+ else
+- resize(c, m->wx + mw, m->wy, m->ww - mw - (2*c->bw), m->wh - (2*c->bw), False);
++ resize(c, m->wx + mw + gappx/ns, m->wy + gappx, m->ww - mw - (2*c->bw) - gappx*(5-ns)/2, m->wh - (2*c->bw) - 2*gappx, False);
+ }
+
+ void
+--
+2.21.0
+