Rebased against 6.2 (was c82db690cc0c4624dad4dc6ae899020799ec84db)

pull/19/head
bakkeby 4 years ago
parent c8e1da690c
commit d3307b7ccb

@ -1,4 +1,4 @@
From fdddb1d6bca7cf57c15c63e28994441f7fe4997d Mon Sep 17 00:00:00 2001 From 986ee6a3ae3dcdd704b69f1dbd954115246021bf Mon Sep 17 00:00:00 2001
From: bakkeby <bakkeby@gmail.com> From: bakkeby <bakkeby@gmail.com>
Date: Tue, 7 Apr 2020 10:47:07 +0200 Date: Tue, 7 Apr 2020 10:47:07 +0200
Subject: [PATCH] Alpha, adds transparency for the status bar. Subject: [PATCH] Alpha, adds transparency for the status bar.
@ -44,7 +44,7 @@ index 1c0b587..4f68fe8 100644
/* tagging */ /* tagging */
static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
diff --git a/config.mk b/config.mk diff --git a/config.mk b/config.mk
index 7084c33..21b5404 100644 index 6d36cb7..3cb1518 100644
--- a/config.mk --- a/config.mk
+++ b/config.mk +++ b/config.mk
@@ -22,7 +22,7 @@ FREETYPEINC = /usr/include/freetype2 @@ -22,7 +22,7 @@ FREETYPEINC = /usr/include/freetype2
@ -55,7 +55,7 @@ index 7084c33..21b5404 100644
+LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} ${FREETYPELIBS} -lXrender +LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} ${FREETYPELIBS} -lXrender
# flags # flags
CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_C_SOURCE=200809L -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS} CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_C_SOURCE=2 -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS}
diff --git a/drw.c b/drw.c diff --git a/drw.c b/drw.c
index 8fd1ca4..c202cb3 100644 index 8fd1ca4..c202cb3 100644
--- a/drw.c --- a/drw.c
@ -293,5 +293,5 @@ index 4465af1..20f8309 100644
zoom(const Arg *arg) zoom(const Arg *arg)
{ {
-- --
2.17.1 2.19.1

@ -1,4 +1,4 @@
From fdddb1d6bca7cf57c15c63e28994441f7fe4997d Mon Sep 17 00:00:00 2001 From 986ee6a3ae3dcdd704b69f1dbd954115246021bf Mon Sep 17 00:00:00 2001
From: bakkeby <bakkeby@gmail.com> From: bakkeby <bakkeby@gmail.com>
Date: Tue, 7 Apr 2020 10:47:07 +0200 Date: Tue, 7 Apr 2020 10:47:07 +0200
Subject: [PATCH 1/2] Alpha, adds transparency for the status bar. Subject: [PATCH 1/2] Alpha, adds transparency for the status bar.
@ -44,7 +44,7 @@ index 1c0b587..4f68fe8 100644
/* tagging */ /* tagging */
static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
diff --git a/config.mk b/config.mk diff --git a/config.mk b/config.mk
index 7084c33..21b5404 100644 index 6d36cb7..3cb1518 100644
--- a/config.mk --- a/config.mk
+++ b/config.mk +++ b/config.mk
@@ -22,7 +22,7 @@ FREETYPEINC = /usr/include/freetype2 @@ -22,7 +22,7 @@ FREETYPEINC = /usr/include/freetype2
@ -55,7 +55,7 @@ index 7084c33..21b5404 100644
+LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} ${FREETYPELIBS} -lXrender +LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} ${FREETYPELIBS} -lXrender
# flags # flags
CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_C_SOURCE=200809L -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS} CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_C_SOURCE=2 -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS}
diff --git a/drw.c b/drw.c diff --git a/drw.c b/drw.c
index 8fd1ca4..c202cb3 100644 index 8fd1ca4..c202cb3 100644
--- a/drw.c --- a/drw.c
@ -293,10 +293,10 @@ index 4465af1..20f8309 100644
zoom(const Arg *arg) zoom(const Arg *arg)
{ {
-- --
2.17.1 2.19.1
From 2c9055147266ac062dfe82ea946b4c5a5b9bfe81 Mon Sep 17 00:00:00 2001 From 1a36b6c4952bd1e9a6d86deef96996fbea1e481e Mon Sep 17 00:00:00 2001
From: bakkeby <bakkeby@gmail.com> From: bakkeby <bakkeby@gmail.com>
Date: Tue, 7 Apr 2020 10:53:35 +0200 Date: Tue, 7 Apr 2020 10:53:35 +0200
Subject: [PATCH 2/2] Adding systray patch Subject: [PATCH 2/2] Adding systray patch
@ -323,7 +323,7 @@ index 4f68fe8..1952613 100644
static const char dmenufont[] = "monospace:size=10"; static const char dmenufont[] = "monospace:size=10";
static const char col_gray1[] = "#222222"; static const char col_gray1[] = "#222222";
diff --git a/dwm.c b/dwm.c diff --git a/dwm.c b/dwm.c
index 20f8309..209c906 100644 index 20f8309..6e57ef8 100644
--- a/dwm.c --- a/dwm.c
+++ b/dwm.c +++ b/dwm.c
@@ -59,12 +59,30 @@ @@ -59,12 +59,30 @@
@ -959,7 +959,7 @@ index 20f8309..209c906 100644
+ i->mon = m; + i->mon = m;
+ } + }
+ w = w ? w + systrayspacing : 1; + w = w ? w + systrayspacing : 1;
+ x -= w; + x -= w;
+ XMoveResizeWindow(dpy, systray->win, x - xpad, m->by + ypad, w, bh); + XMoveResizeWindow(dpy, systray->win, x - xpad, m->by + ypad, w, bh);
+ wc.x = x - xpad; + wc.x = x - xpad;
+ wc.y = m->by + ypad; + wc.y = m->by + ypad;
@ -1045,5 +1045,5 @@ index 20f8309..209c906 100644
* ignored (especially on UnmapNotify's). Other types of errors call Xlibs * ignored (especially on UnmapNotify's). Other types of errors call Xlibs
* default error handler, which may call exit. */ * default error handler, which may call exit. */
-- --
2.17.1 2.19.1

@ -1,4 +1,4 @@
From 5db9b0d2860948ff42cbdae4031c90b3aa9c7d2f Mon Sep 17 00:00:00 2001 From 487cbc072eeff0051a43048b60c45d2f06bc2631 Mon Sep 17 00:00:00 2001
From: bakkeby <bakkeby@gmail.com> From: bakkeby <bakkeby@gmail.com>
Date: Thu, 23 Apr 2020 10:06:18 +0200 Date: Thu, 23 Apr 2020 10:06:18 +0200
Subject: [PATCH] attachbottom patch Subject: [PATCH] attachbottom patch
@ -67,5 +67,5 @@ index 4465af1..bf13d15 100644
} }
if (m == selmon) if (m == selmon)
-- --
2.17.1 2.19.1

@ -1,4 +1,4 @@
From 55b7865fbba68924308a12f7ffc56b304ad7bbe5 Mon Sep 17 00:00:00 2001 From dbbd234a9a3f82a29b3e82a205f4e4ee88371b6a Mon Sep 17 00:00:00 2001
From: bakkeby <bakkeby@gmail.com> From: bakkeby <bakkeby@gmail.com>
Date: Tue, 7 Apr 2020 12:27:21 +0200 Date: Tue, 7 Apr 2020 12:27:21 +0200
Subject: [PATCH] Adding attachx patch (combined attach Subject: [PATCH] Adding attachx patch (combined attach
@ -133,5 +133,5 @@ index 4465af1..8667baa 100644
focus(NULL); focus(NULL);
arrange(NULL); arrange(NULL);
-- --
2.17.1 2.19.1

@ -1,4 +1,4 @@
From 0fd06555d523bd015e683d65002e59643fd5e2ca Mon Sep 17 00:00:00 2001 From 071da39aca72871cb433e1dbfc439a31ebf5c502 Mon Sep 17 00:00:00 2001
From: bakkeby <bakkeby@gmail.com> From: bakkeby <bakkeby@gmail.com>
Date: Tue, 7 Apr 2020 12:28:17 +0200 Date: Tue, 7 Apr 2020 12:28:17 +0200
Subject: [PATCH] Adding autostart patch Subject: [PATCH] Adding autostart patch
@ -47,5 +47,5 @@ index 4465af1..e634dc1 100644
cleanup(); cleanup();
XCloseDisplay(dpy); XCloseDisplay(dpy);
-- --
2.17.1 2.19.1

@ -1,4 +1,4 @@
From 69f91089d9248fa9695eb925956e255a215171b8 Mon Sep 17 00:00:00 2001 From b43967c344032b6bd2bf0e495641ac22ce8c7294 Mon Sep 17 00:00:00 2001
From: bakkeby <bakkeby@gmail.com> From: bakkeby <bakkeby@gmail.com>
Date: Tue, 7 Apr 2020 12:29:08 +0200 Date: Tue, 7 Apr 2020 12:29:08 +0200
Subject: [PATCH] Adding 6.2 center patch with multi-monitor fix and Subject: [PATCH] Adding 6.2 center patch with multi-monitor fix and
@ -88,5 +88,5 @@ index 4465af1..ab33757 100644
void void
-- --
2.17.1 2.19.1

@ -1,4 +1,4 @@
From 521c7445948f467ad4d3021b31433d1a711c7226 Mon Sep 17 00:00:00 2001 From 1f9992ae1a745a86294a555051ea17ba4ef5ce5f Mon Sep 17 00:00:00 2001
From: bakkeby <bakkeby@gmail.com> From: bakkeby <bakkeby@gmail.com>
Date: Mon, 6 Apr 2020 12:04:55 +0200 Date: Mon, 6 Apr 2020 12:04:55 +0200
Subject: [PATCH] Adding cfacts patch which provides the ability to assign Subject: [PATCH] Adding cfacts patch which provides the ability to assign
@ -113,5 +113,5 @@ index 4465af1..5592c57 100644
} }
-- --
2.17.1 2.19.1

@ -1,9 +1,8 @@
From 7a9b2a8f26b6692082e6392b2781e1cdc1223bde Mon Sep 17 00:00:00 2001 From 1f9992ae1a745a86294a555051ea17ba4ef5ce5f Mon Sep 17 00:00:00 2001
From: bakkeby <bakkeby@gmail.com> From: bakkeby <bakkeby@gmail.com>
Date: Mon, 6 Apr 2020 12:04:55 +0200 Date: Mon, 6 Apr 2020 12:04:55 +0200
Subject: [PATCH 1/2] [PATCH] Adding cfacts patch which provides the ability to Subject: [PATCH 1/2] Adding cfacts patch which provides the ability to assign
assign different weights to clients in their respective stack in tiled different weights to clients in their respective stack in tiled layout.
layout.
Refer to https://dwm.suckless.org/patches/cfacts/ Refer to https://dwm.suckless.org/patches/cfacts/
--- ---
@ -114,10 +113,10 @@ index 4465af1..5592c57 100644
} }
-- --
2.17.1 2.19.1
From 93f9f1bcf61a11a1e9af9469e4f26c6517fb8956 Mon Sep 17 00:00:00 2001 From ee8e7b96d6f36f244d68753c2e795a29a7118913 Mon Sep 17 00:00:00 2001
From: bakkeby <bakkeby@gmail.com> From: bakkeby <bakkeby@gmail.com>
Date: Mon, 6 Apr 2020 12:16:26 +0200 Date: Mon, 6 Apr 2020 12:16:26 +0200
Subject: [PATCH 2/2] The dragcfact patch allow you resize clients' size (i.e. Subject: [PATCH 2/2] The dragcfact patch allow you resize clients' size (i.e.
@ -267,5 +266,5 @@ index 5592c57..2d591e3 100644
arrange(selmon); arrange(selmon);
} }
-- --
2.17.1 2.19.1

@ -1,6 +1,6 @@
From f9393d5689c858e65d016d15ba071464ce0ccc45 Mon Sep 17 00:00:00 2001 From bb98aa123fe3490aa731a16e95fe8b4d30d7fe5e Mon Sep 17 00:00:00 2001
From: bakkeby <bakkeby@gmail.com> From: bakkeby <bakkeby@gmail.com>
Date: Tue, 7 Apr 2020 12:30:00 +0200 Date: Fri, 1 May 2020 22:20:25 +0200
Subject: [PATCH] cyclelayout, function to cycle through available layouts. Subject: [PATCH] cyclelayout, function to cycle through available layouts.
MOD-CTRL-, and MOD-CTRL-. MOD-CTRL-, and MOD-CTRL-.
@ -91,5 +91,5 @@ index 4465af1..26db8e3 100644
destroynotify(XEvent *e) destroynotify(XEvent *e)
{ {
-- --
2.17.1 2.19.1

@ -1,6 +1,6 @@
From d7d15fdd1adaaf124241b379de34ea0f5a7d4ffa Mon Sep 17 00:00:00 2001 From 3b19d32505d541c68887288ed5bdacf826a98246 Mon Sep 17 00:00:00 2001
From: bakkeby <bakkeby@gmail.com> From: bakkeby <bakkeby@gmail.com>
Date: Fri, 1 May 2020 17:04:28 +0200 Date: Fri, 1 May 2020 22:24:50 +0200
Subject: [PATCH] fakefullscreenclient - enable fake fullscreen on a per client Subject: [PATCH] fakefullscreenclient - enable fake fullscreen on a per client
basis basis
@ -170,5 +170,5 @@ index 4465af1..c193c3b 100644
selmon->sel->isfloating = !selmon->sel->isfloating || selmon->sel->isfixed; selmon->sel->isfloating = !selmon->sel->isfloating || selmon->sel->isfixed;
if (selmon->sel->isfloating) if (selmon->sel->isfloating)
-- --
2.17.1 2.19.1

@ -1,4 +1,4 @@
From a651c9e15d1d9191ce8a7790d352603ae356d9d5 Mon Sep 17 00:00:00 2001 From d4387f13bfc45aa4103ffd51e76730eb0135f8f0 Mon Sep 17 00:00:00 2001
From: bakkeby <bakkeby@gmail.com> From: bakkeby <bakkeby@gmail.com>
Date: Tue, 7 Apr 2020 12:30:57 +0200 Date: Tue, 7 Apr 2020 12:30:57 +0200
Subject: [PATCH] fancybar, shows the titles of all visible windows in the Subject: [PATCH] fancybar, shows the titles of all visible windows in the
@ -92,5 +92,5 @@ index 4465af1..eff2da6 100644
drw_map(drw, m->barwin, 0, 0, m->ww, bh); drw_map(drw, m->barwin, 0, 0, m->ww, bh);
} }
-- --
2.17.1 2.19.1

@ -1,4 +1,4 @@
From 8dfae1aad85aa7ac03852196d3b77121dfe60aee Mon Sep 17 00:00:00 2001 From e738df9d539b0c8106d1a04ff8d78af65e2ac748 Mon Sep 17 00:00:00 2001
From: bakkeby <bakkeby@gmail.com> From: bakkeby <bakkeby@gmail.com>
Date: Tue, 7 Apr 2020 12:32:08 +0200 Date: Tue, 7 Apr 2020 12:32:08 +0200
Subject: [PATCH] Adding flextile patch Subject: [PATCH] Adding flextile patch
@ -240,5 +240,5 @@ index 4465af1..5a31822 100644
arrange(selmon); arrange(selmon);
} }
-- --
2.17.1 2.19.1

@ -1,4 +1,4 @@
From 286ca3bb1af08b452bf8140abcc23d4ef61baaa2 Mon Sep 17 00:00:00 2001 From 9484f887c623ec16d90c7a25ec1160bdb884258b Mon Sep 17 00:00:00 2001
From: bakkeby <bakkeby@gmail.com> From: bakkeby <bakkeby@gmail.com>
Date: Tue, 7 Apr 2020 12:33:04 +0200 Date: Tue, 7 Apr 2020 12:33:04 +0200
Subject: [PATCH] Activate a window in response to _NET_ACTIVE_WINDOW Subject: [PATCH] Activate a window in response to _NET_ACTIVE_WINDOW
@ -55,5 +55,5 @@ index 4465af1..3919d47 100644
} }
-- --
2.17.1 2.19.1

@ -1,4 +1,4 @@
From 889e53e38ae19fae0c25046af48b0b4f3b4e4a4c Mon Sep 17 00:00:00 2001 From baaeaa28dfc361b38e218c7c089edd7867b15c53 Mon Sep 17 00:00:00 2001
From: bakkeby <bakkeby@gmail.com> From: bakkeby <bakkeby@gmail.com>
Date: Tue, 7 Apr 2020 11:40:30 +0200 Date: Tue, 7 Apr 2020 11:40:30 +0200
Subject: [PATCH] Lose fullscreen on focus change Subject: [PATCH] Lose fullscreen on focus change
@ -21,5 +21,5 @@ index 4465af1..520a794 100644
XSetWindowBorder(dpy, c->win, scheme[SchemeNorm][ColBorder].pixel); XSetWindowBorder(dpy, c->win, scheme[SchemeNorm][ColBorder].pixel);
if (setfocus) { if (setfocus) {
-- --
2.17.1 2.19.1

@ -1,4 +1,4 @@
From 6558d1db2cd30346c219b57a1011120954288faf Mon Sep 17 00:00:00 2001 From e21382979ef624bd15952d7228f0fb878d21bcb0 Mon Sep 17 00:00:00 2001
From: bakkeby <bakkeby@gmail.com> From: bakkeby <bakkeby@gmail.com>
Date: Sun, 26 Apr 2020 10:49:08 +0200 Date: Sun, 26 Apr 2020 10:49:08 +0200
Subject: [PATCH] Monitor rules patch Subject: [PATCH] Monitor rules patch
@ -91,5 +91,5 @@ index 4465af1..0b33335 100644
} }
-- --
2.17.1 2.19.1

@ -1,4 +1,4 @@
From 555ba7661eaed73ee47d57cd583a1c86ca792c39 Mon Sep 17 00:00:00 2001 From e92b0373f8ebb59121cbb9f514f7bc977f7c5066 Mon Sep 17 00:00:00 2001
From: bakkeby <bakkeby@gmail.com> From: bakkeby <bakkeby@gmail.com>
Date: Sun, 26 Apr 2020 14:38:59 +0200 Date: Sun, 26 Apr 2020 14:38:59 +0200
Subject: [PATCH] Monitor tags patch Subject: [PATCH] Monitor tags patch
@ -127,5 +127,5 @@ index 4465af1..54b346a 100644
tile(Monitor *m) tile(Monitor *m)
{ {
-- --
2.17.1 2.19.1

@ -1,4 +1,4 @@
From a61429d4ac9e1154703533effc619068c20c3075 Mon Sep 17 00:00:00 2001 From e293b80a74a060446c431971034ebd91834f13cb Mon Sep 17 00:00:00 2001
From: bakkeby <bakkeby@gmail.com> From: bakkeby <bakkeby@gmail.com>
Date: Tue, 7 Apr 2020 12:34:15 +0200 Date: Tue, 7 Apr 2020 12:34:15 +0200
Subject: [PATCH] pertag patch, keeps layout, mwfact, barpos and nmaster per Subject: [PATCH] pertag patch, keeps layout, mwfact, barpos and nmaster per
@ -192,5 +192,5 @@ index 4465af1..55f8f92 100644
arrange(selmon); arrange(selmon);
} }
-- --
2.17.1 2.19.1

@ -1,204 +1,7 @@
From a61429d4ac9e1154703533effc619068c20c3075 Mon Sep 17 00:00:00 2001 From f679a0a266e4d8c86018612e91ccdf2746ddd654 Mon Sep 17 00:00:00 2001
From: bakkeby <bakkeby@gmail.com> From: bakkeby <bakkeby@gmail.com>
Date: Tue, 7 Apr 2020 12:34:15 +0200 Date: Fri, 1 May 2020 22:46:52 +0200
Subject: [PATCH 1/2] pertag patch, keeps layout, mwfact, barpos and nmaster Subject: [PATCH] flextile-deluxe layout - a re-envisoned and revamped
per tag
Refer to https://dwm.suckless.org/patches/pertag/
---
dwm.c | 93 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-----
1 file changed, 86 insertions(+), 7 deletions(-)
diff --git a/dwm.c b/dwm.c
index 4465af1..55f8f92 100644
--- a/dwm.c
+++ b/dwm.c
@@ -111,6 +111,7 @@ typedef struct {
void (*arrange)(Monitor *);
} Layout;
+typedef struct Pertag Pertag;
struct Monitor {
char ltsymbol[16];
float mfact;
@@ -130,6 +131,7 @@ struct Monitor {
Monitor *next;
Window barwin;
const Layout *lt[2];
+ Pertag *pertag;
};
typedef struct {
@@ -271,6 +273,16 @@ static Window root, wmcheckwin;
/* configuration, allows nested code to access above variables */
#include "config.h"
+struct Pertag {
+ unsigned int curtag, prevtag; /* current and previous tag */
+ int nmasters[LENGTH(tags) + 1]; /* number of windows in master area */
+ float mfacts[LENGTH(tags) + 1]; /* mfacts per tag */
+ unsigned int sellts[LENGTH(tags) + 1]; /* selected layouts */
+ const Layout *ltidxs[LENGTH(tags) + 1][2]; /* matrix of tags and layouts indexes */
+ Bool showbars[LENGTH(tags) + 1]; /* display bar for the current tag */
+ Client *prevzooms[LENGTH(tags) + 1]; /* store zoom information */
+};
+
/* compile-time check if all tags fit into an unsigned int bit array. */
struct NumTags { char limitexceeded[LENGTH(tags) > 31 ? -1 : 1]; };
@@ -631,6 +643,7 @@ Monitor *
createmon(void)
{
Monitor *m;
+ int i;
m = ecalloc(1, sizeof(Monitor));
m->tagset[0] = m->tagset[1] = 1;
@@ -641,6 +654,27 @@ createmon(void)
m->lt[0] = &layouts[0];
m->lt[1] = &layouts[1 % LENGTH(layouts)];
strncpy(m->ltsymbol, layouts[0].symbol, sizeof m->ltsymbol);
+ if (!(m->pertag = (Pertag *)calloc(1, sizeof(Pertag))))
+ die("fatal: could not malloc() %u bytes\n", sizeof(Pertag));
+ m->pertag->curtag = m->pertag->prevtag = 1;
+ for (i = 0; i <= LENGTH(tags); i++) {
+ /* init nmaster */
+ m->pertag->nmasters[i] = m->nmaster;
+
+ /* init mfacts */
+ m->pertag->mfacts[i] = m->mfact;
+
+ /* init layouts */
+ m->pertag->ltidxs[i][0] = m->lt[0];
+ m->pertag->ltidxs[i][1] = m->lt[1];
+ m->pertag->sellts[i] = m->sellt;
+
+ /* init showbar */
+ m->pertag->showbars[i] = m->showbar;
+
+ /* swap focus and zoomswap*/
+ m->pertag->prevzooms[i] = NULL;
+ }
return m;
}
@@ -966,7 +1000,7 @@ grabkeys(void)
void
incnmaster(const Arg *arg)
{
- selmon->nmaster = MAX(selmon->nmaster + arg->i, 0);
+ selmon->nmaster = selmon->pertag->nmasters[selmon->pertag->curtag] = MAX(selmon->nmaster + arg->i, 0);
arrange(selmon);
}
@@ -1500,10 +1534,13 @@ setfullscreen(Client *c, int fullscreen)
void
setlayout(const Arg *arg)
{
- if (!arg || !arg->v || arg->v != selmon->lt[selmon->sellt])
- selmon->sellt ^= 1;
+ if (!arg || !arg->v || arg->v != selmon->lt[selmon->sellt]) {
+ selmon->pertag->sellts[selmon->pertag->curtag] ^= 1;
+ selmon->sellt = selmon->pertag->sellts[selmon->pertag->curtag];
+ }
if (arg && arg->v)
- selmon->lt[selmon->sellt] = (Layout *)arg->v;
+ selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt] = (Layout *)arg->v;
+ selmon->lt[selmon->sellt] = selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt];
strncpy(selmon->ltsymbol, selmon->lt[selmon->sellt]->symbol, sizeof selmon->ltsymbol);
if (selmon->sel)
arrange(selmon);
@@ -1522,7 +1559,7 @@ setmfact(const Arg *arg)
f = arg->f < 1.0 ? arg->f + selmon->mfact : arg->f - 1.0;
if (f < 0.1 || f > 0.9)
return;
- selmon->mfact = f;
+ selmon->mfact = selmon->pertag->mfacts[selmon->pertag->curtag] = f;
arrange(selmon);
}
@@ -1699,7 +1736,7 @@ tile(Monitor *m)
void
togglebar(const Arg *arg)
{
- selmon->showbar = !selmon->showbar;
+ selmon->showbar = selmon->pertag->showbars[selmon->pertag->curtag] = !selmon->showbar;
updatebarpos(selmon);
XMoveResizeWindow(dpy, selmon->barwin, selmon->wx, selmon->by, selmon->ww, bh);
arrange(selmon);
@@ -1738,9 +1775,29 @@ void
toggleview(const Arg *arg)
{
unsigned int newtagset = selmon->tagset[selmon->seltags] ^ (arg->ui & TAGMASK);
+ int i;
if (newtagset) {
+ if (newtagset == ~0) {
+ selmon->pertag->prevtag = selmon->pertag->curtag;
+ selmon->pertag->curtag = 0;
+ }
+ /* test if the user did not select the same tag */
+ if (!(newtagset & 1 << (selmon->pertag->curtag - 1))) {
+ selmon->pertag->prevtag = selmon->pertag->curtag;
+ for (i=0; !(newtagset & 1 << i); i++) ;
+ selmon->pertag->curtag = i + 1;
+ }
selmon->tagset[selmon->seltags] = newtagset;
+
+ /* apply settings for this view */
+ selmon->nmaster = selmon->pertag->nmasters[selmon->pertag->curtag];
+ selmon->mfact = selmon->pertag->mfacts[selmon->pertag->curtag];
+ selmon->sellt = selmon->pertag->sellts[selmon->pertag->curtag];
+ selmon->lt[selmon->sellt] = selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt];
+ selmon->lt[selmon->sellt^1] = selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt^1];
+ if (selmon->showbar != selmon->pertag->showbars[selmon->pertag->curtag])
+ togglebar(NULL);
focus(NULL);
arrange(selmon);
}
@@ -2035,11 +2092,33 @@ updatewmhints(Client *c)
void
view(const Arg *arg)
{
+ int i;
+ unsigned int tmptag;
+
if ((arg->ui & TAGMASK) == selmon->tagset[selmon->seltags])
return;
selmon->seltags ^= 1; /* toggle sel tagset */
- if (arg->ui & TAGMASK)
+ if (arg->ui & TAGMASK) {
+ selmon->pertag->prevtag = selmon->pertag->curtag;
selmon->tagset[selmon->seltags] = arg->ui & TAGMASK;
+ if (arg->ui == ~0)
+ selmon->pertag->curtag = 0;
+ else {
+ for (i=0; !(arg->ui & 1 << i); i++) ;
+ selmon->pertag->curtag = i + 1;
+ }
+ } else {
+ tmptag = selmon->pertag->prevtag;
+ selmon->pertag->prevtag = selmon->pertag->curtag;
+ selmon->pertag->curtag = tmptag;
+ }
+ selmon->nmaster = selmon->pertag->nmasters[selmon->pertag->curtag];
+ selmon->mfact = selmon->pertag->mfacts[selmon->pertag->curtag];
+ selmon->sellt = selmon->pertag->sellts[selmon->pertag->curtag];
+ selmon->lt[selmon->sellt] = selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt];
+ selmon->lt[selmon->sellt^1] = selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt^1];
+ if (selmon->showbar != selmon->pertag->showbars[selmon->pertag->curtag])
+ togglebar(NULL);
focus(NULL);
arrange(selmon);
}
--
2.17.1
From 7ee505def279edd6eec4b8b1156e3606df0911c1 Mon Sep 17 00:00:00 2001
From: bakkeby <bakkeby@gmail.com>
Date: Fri, 1 May 2020 14:19:11 +0200
Subject: [PATCH 2/2] flextile-deluxe layout - a re-envisoned and revamped
flextile flextile
Features: Features:
@ -225,15 +28,15 @@ Features:
- supports rmaster like layout mirroring - supports rmaster like layout mirroring
--- ---
config.def.h | 32 +- config.def.h | 32 +-
dwm.c | 98 ++++--- dwm.c | 189 ++++++++----
flextile-deluxe.c | 727 ++++++++++++++++++++++++++++++++++++++++++++++ flextile-deluxe.c | 727 ++++++++++++++++++++++++++++++++++++++++++++++
flextile-deluxe.h | 113 +++++++ flextile-deluxe.h | 113 +++++++
4 files changed, 922 insertions(+), 48 deletions(-) 4 files changed, 1007 insertions(+), 54 deletions(-)
create mode 100644 flextile-deluxe.c create mode 100644 flextile-deluxe.c
create mode 100644 flextile-deluxe.h create mode 100644 flextile-deluxe.h
diff --git a/config.def.h b/config.def.h diff --git a/config.def.h b/config.def.h
index 1c0b587..1b77309 100644 index 1c0b587..1df9709 100644
--- a/config.def.h --- a/config.def.h
+++ b/config.def.h +++ b/config.def.h
@@ -34,13 +34,26 @@ static const Rule rules[] = { @@ -34,13 +34,26 @@ static const Rule rules[] = {
@ -250,7 +53,7 @@ index 1c0b587..1b77309 100644
- { "[M]", monocle }, - { "[M]", monocle },
+ /* symbol arrange function, { nmaster, nstack, layout, master axis, stack axis, secondary stack axis } */ + /* symbol arrange function, { nmaster, nstack, layout, master axis, stack axis, secondary stack axis } */
+ { "[]=", flextile, { -1, -1, SPLIT_VERTICAL, TOP_TO_BOTTOM, TOP_TO_BOTTOM, 0, NULL } }, // default tile layout + { "[]=", flextile, { -1, -1, SPLIT_VERTICAL, TOP_TO_BOTTOM, TOP_TO_BOTTOM, 0, NULL } }, // default tile layout
+ { "><>", NULL, {0} }, /* no layout function means floating behavior */ + { "><>", NULL, {0} }, /* no layout function means floating behavior */
+ { "[M]", flextile, { -1, -1, NO_SPLIT, MONOCLE, 0, 0, NULL } }, // monocle + { "[M]", flextile, { -1, -1, NO_SPLIT, MONOCLE, 0, 0, NULL } }, // monocle
+ { "|||", flextile, { -1, -1, SPLIT_VERTICAL, LEFT_TO_RIGHT, TOP_TO_BOTTOM, 0, NULL } }, // columns (col) layout + { "|||", flextile, { -1, -1, SPLIT_VERTICAL, LEFT_TO_RIGHT, TOP_TO_BOTTOM, 0, NULL } }, // columns (col) layout
+ { ">M>", flextile, { -1, -1, FLOATING_MASTER, LEFT_TO_RIGHT, LEFT_TO_RIGHT, 0, NULL } }, // floating master + { ">M>", flextile, { -1, -1, FLOATING_MASTER, LEFT_TO_RIGHT, LEFT_TO_RIGHT, 0, NULL } }, // floating master
@ -293,10 +96,10 @@ index 1c0b587..1b77309 100644
{ MODKEY|ShiftMask, XK_space, togglefloating, {0} }, { MODKEY|ShiftMask, XK_space, togglefloating, {0} },
{ MODKEY, XK_0, view, {.ui = ~0 } }, { MODKEY, XK_0, view, {.ui = ~0 } },
diff --git a/dwm.c b/dwm.c diff --git a/dwm.c b/dwm.c
index 55f8f92..efd00e7 100644 index 4465af1..efd00e7 100644
--- a/dwm.c --- a/dwm.c
+++ b/dwm.c +++ b/dwm.c
@@ -106,15 +106,28 @@ typedef struct { @@ -106,14 +106,28 @@ typedef struct {
const Arg arg; const Arg arg;
} Key; } Key;
@ -316,7 +119,7 @@ index 55f8f92..efd00e7 100644
+ LayoutPreset preset; + LayoutPreset preset;
} Layout; } Layout;
typedef struct Pertag Pertag; +typedef struct Pertag Pertag;
struct Monitor { struct Monitor {
char ltsymbol[16]; char ltsymbol[16];
float mfact; float mfact;
@ -325,7 +128,15 @@ index 55f8f92..efd00e7 100644
int nmaster; int nmaster;
int num; int num;
int by; /* bar geometry */ int by; /* bar geometry */
@@ -182,7 +195,6 @@ static void killclient(const Arg *arg); @@ -130,6 +144,7 @@ struct Monitor {
Monitor *next;
Window barwin;
const Layout *lt[2];
+ Pertag *pertag;
};
typedef struct {
@@ -180,7 +195,6 @@ static void killclient(const Arg *arg);
static void manage(Window w, XWindowAttributes *wa); static void manage(Window w, XWindowAttributes *wa);
static void mappingnotify(XEvent *e); static void mappingnotify(XEvent *e);
static void maprequest(XEvent *e); static void maprequest(XEvent *e);
@ -333,7 +144,7 @@ index 55f8f92..efd00e7 100644
static void motionnotify(XEvent *e); static void motionnotify(XEvent *e);
static void movemouse(const Arg *arg); static void movemouse(const Arg *arg);
static Client *nexttiled(Client *c); static Client *nexttiled(Client *c);
@@ -210,7 +222,6 @@ static void sigchld(int unused); @@ -208,7 +222,6 @@ static void sigchld(int unused);
static void spawn(const Arg *arg); static void spawn(const Arg *arg);
static void tag(const Arg *arg); static void tag(const Arg *arg);
static void tagmon(const Arg *arg); static void tagmon(const Arg *arg);
@ -341,7 +152,7 @@ index 55f8f92..efd00e7 100644
static void togglebar(const Arg *arg); static void togglebar(const Arg *arg);
static void togglefloating(const Arg *arg); static void togglefloating(const Arg *arg);
static void toggletag(const Arg *arg); static void toggletag(const Arg *arg);
@@ -236,6 +247,8 @@ static int xerrordummy(Display *dpy, XErrorEvent *ee); @@ -234,6 +247,8 @@ static int xerrordummy(Display *dpy, XErrorEvent *ee);
static int xerrorstart(Display *dpy, XErrorEvent *ee); static int xerrorstart(Display *dpy, XErrorEvent *ee);
static void zoom(const Arg *arg); static void zoom(const Arg *arg);
@ -350,24 +161,34 @@ index 55f8f92..efd00e7 100644
/* variables */ /* variables */
static const char broken[] = "broken"; static const char broken[] = "broken";
static char stext[256]; static char stext[256];
@@ -278,11 +291,15 @@ struct Pertag { @@ -271,6 +286,20 @@ static Window root, wmcheckwin;
int nmasters[LENGTH(tags) + 1]; /* number of windows in master area */ /* configuration, allows nested code to access above variables */
float mfacts[LENGTH(tags) + 1]; /* mfacts per tag */ #include "config.h"
unsigned int sellts[LENGTH(tags) + 1]; /* selected layouts */
- const Layout *ltidxs[LENGTH(tags) + 1][2]; /* matrix of tags and layouts indexes */ +struct Pertag {
+ unsigned int curtag, prevtag; /* current and previous tag */
+ int nmasters[LENGTH(tags) + 1]; /* number of windows in master area */
+ float mfacts[LENGTH(tags) + 1]; /* mfacts per tag */
+ unsigned int sellts[LENGTH(tags) + 1]; /* selected layouts */
+ int nstacks[LENGTH(tags) + 1]; /* number of windows in primary stack area */ + int nstacks[LENGTH(tags) + 1]; /* number of windows in primary stack area */
+ int ltaxis[LENGTH(tags) + 1][LTAXIS_LAST]; + int ltaxis[LENGTH(tags) + 1][LTAXIS_LAST];
+ const Layout *ltidxs[LENGTH(tags) + 1][3]; /* matrix of tags and layouts indexes */ + const Layout *ltidxs[LENGTH(tags) + 1][3]; /* matrix of tags and layouts indexes */
Bool showbars[LENGTH(tags) + 1]; /* display bar for the current tag */ + Bool showbars[LENGTH(tags) + 1]; /* display bar for the current tag */
Client *prevzooms[LENGTH(tags) + 1]; /* store zoom information */ + Client *prevzooms[LENGTH(tags) + 1]; /* store zoom information */
}; +};
+
+#include "flextile-deluxe.c" +#include "flextile-deluxe.c"
+ +
/* compile-time check if all tags fit into an unsigned int bit array. */ /* compile-time check if all tags fit into an unsigned int bit array. */
struct NumTags { char limitexceeded[LENGTH(tags) > 31 ? -1 : 1]; }; struct NumTags { char limitexceeded[LENGTH(tags) > 31 ? -1 : 1]; };
@@ -649,17 +666,25 @@ createmon(void) @@ -631,16 +660,51 @@ Monitor *
createmon(void)
{
Monitor *m;
+ int i;
m = ecalloc(1, sizeof(Monitor));
m->tagset[0] = m->tagset[1] = 1; m->tagset[0] = m->tagset[1] = 1;
m->mfact = mfact; m->mfact = mfact;
m->nmaster = nmaster; m->nmaster = nmaster;
@ -383,29 +204,46 @@ index 55f8f92..efd00e7 100644
+ m->ltaxis[STACK] = m->lt[0]->preset.stack1axis; + m->ltaxis[STACK] = m->lt[0]->preset.stack1axis;
+ m->ltaxis[STACK2] = m->lt[0]->preset.stack2axis; + m->ltaxis[STACK2] = m->lt[0]->preset.stack2axis;
+ +
if (!(m->pertag = (Pertag *)calloc(1, sizeof(Pertag)))) + if (!(m->pertag = (Pertag *)calloc(1, sizeof(Pertag))))
die("fatal: could not malloc() %u bytes\n", sizeof(Pertag)); + die("fatal: could not malloc() %u bytes\n", sizeof(Pertag));
m->pertag->curtag = m->pertag->prevtag = 1; + m->pertag->curtag = m->pertag->prevtag = 1;
for (i = 0; i <= LENGTH(tags); i++) { + for (i = 0; i <= LENGTH(tags); i++) {
/* init nmaster */ + /* init nmaster */
m->pertag->nmasters[i] = m->nmaster; + m->pertag->nmasters[i] = m->nmaster;
+ m->pertag->nstacks[i] = m->nstack; + m->pertag->nstacks[i] = m->nstack;
+
/* init mfacts */ + /* init mfacts */
m->pertag->mfacts[i] = m->mfact; + m->pertag->mfacts[i] = m->mfact;
@@ -669,6 +694,11 @@ createmon(void) +
m->pertag->ltidxs[i][1] = m->lt[1]; + /* init layouts */
m->pertag->sellts[i] = m->sellt; + m->pertag->ltidxs[i][0] = m->lt[0];
+ m->pertag->ltidxs[i][1] = m->lt[1];
+ m->pertag->sellts[i] = m->sellt;
+
+ m->pertag->ltaxis[i][LAYOUT] = m->ltaxis[LAYOUT]; + m->pertag->ltaxis[i][LAYOUT] = m->ltaxis[LAYOUT];
+ m->pertag->ltaxis[i][MASTER] = m->ltaxis[MASTER]; + m->pertag->ltaxis[i][MASTER] = m->ltaxis[MASTER];
+ m->pertag->ltaxis[i][STACK] = m->ltaxis[STACK]; + m->pertag->ltaxis[i][STACK] = m->ltaxis[STACK];
+ m->pertag->ltaxis[i][STACK2] = m->ltaxis[STACK2]; + m->pertag->ltaxis[i][STACK2] = m->ltaxis[STACK2];
+ +
/* init showbar */ + /* init showbar */
m->pertag->showbars[i] = m->showbar; + m->pertag->showbars[i] = m->showbar;
+
+ /* swap focus and zoomswap*/
+ m->pertag->prevzooms[i] = NULL;
+ }
return m;
}
@@ -966,7 +1030,7 @@ grabkeys(void)
void
incnmaster(const Arg *arg)
{
- selmon->nmaster = MAX(selmon->nmaster + arg->i, 0);
+ selmon->nmaster = selmon->pertag->nmasters[selmon->pertag->curtag] = MAX(selmon->nmaster + arg->i, 0);
arrange(selmon);
}
@@ -1134,21 +1164,6 @@ maprequest(XEvent *e) @@ -1100,21 +1164,6 @@ maprequest(XEvent *e)
manage(ev->window, &wa); manage(ev->window, &wa);
} }
@ -427,10 +265,20 @@ index 55f8f92..efd00e7 100644
void void
motionnotify(XEvent *e) motionnotify(XEvent *e)
{ {
@@ -1541,6 +1556,22 @@ setlayout(const Arg *arg) @@ -1500,10 +1549,29 @@ setfullscreen(Client *c, int fullscreen)
void
setlayout(const Arg *arg)
{
- if (!arg || !arg->v || arg->v != selmon->lt[selmon->sellt])
- selmon->sellt ^= 1;
+ if (!arg || !arg->v || arg->v != selmon->lt[selmon->sellt]) {
+ selmon->pertag->sellts[selmon->pertag->curtag] ^= 1;
+ selmon->sellt = selmon->pertag->sellts[selmon->pertag->curtag];
+ }
if (arg && arg->v) if (arg && arg->v)
selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt] = (Layout *)arg->v; - selmon->lt[selmon->sellt] = (Layout *)arg->v;
selmon->lt[selmon->sellt] = selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt]; + selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt] = (Layout *)arg->v;
+ selmon->lt[selmon->sellt] = selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt];
+ +
+ if (selmon->lt[selmon->sellt]->preset.nmaster && selmon->lt[selmon->sellt]->preset.nmaster != -1) + if (selmon->lt[selmon->sellt]->preset.nmaster && selmon->lt[selmon->sellt]->preset.nmaster != -1)
+ selmon->nmaster = selmon->lt[selmon->sellt]->preset.nmaster; + selmon->nmaster = selmon->lt[selmon->sellt]->preset.nmaster;
@ -450,7 +298,16 @@ index 55f8f92..efd00e7 100644
strncpy(selmon->ltsymbol, selmon->lt[selmon->sellt]->symbol, sizeof selmon->ltsymbol); strncpy(selmon->ltsymbol, selmon->lt[selmon->sellt]->symbol, sizeof selmon->ltsymbol);
if (selmon->sel) if (selmon->sel)
arrange(selmon); arrange(selmon);
@@ -1707,32 +1738,6 @@ tagmon(const Arg *arg) @@ -1522,7 +1590,7 @@ setmfact(const Arg *arg)
f = arg->f < 1.0 ? arg->f + selmon->mfact : arg->f - 1.0;
if (f < 0.1 || f > 0.9)
return;
- selmon->mfact = f;
+ selmon->mfact = selmon->pertag->mfacts[selmon->pertag->curtag] = f;
arrange(selmon);
}
@@ -1670,36 +1738,10 @@ tagmon(const Arg *arg)
sendmon(selmon->sel, dirtomon(arg->i)); sendmon(selmon->sel, dirtomon(arg->i));
} }
@ -483,25 +340,84 @@ index 55f8f92..efd00e7 100644
void void
togglebar(const Arg *arg) togglebar(const Arg *arg)
{ {
@@ -2113,10 +2118,15 @@ view(const Arg *arg) - selmon->showbar = !selmon->showbar;
selmon->pertag->curtag = tmptag; + selmon->showbar = selmon->pertag->showbars[selmon->pertag->curtag] = !selmon->showbar;
updatebarpos(selmon);
XMoveResizeWindow(dpy, selmon->barwin, selmon->wx, selmon->by, selmon->ww, bh);
arrange(selmon);
@@ -1738,9 +1780,29 @@ void
toggleview(const Arg *arg)
{
unsigned int newtagset = selmon->tagset[selmon->seltags] ^ (arg->ui & TAGMASK);
+ int i;
if (newtagset) {
+ if (newtagset == ~0) {
+ selmon->pertag->prevtag = selmon->pertag->curtag;
+ selmon->pertag->curtag = 0;
+ }
+ /* test if the user did not select the same tag */
+ if (!(newtagset & 1 << (selmon->pertag->curtag - 1))) {
+ selmon->pertag->prevtag = selmon->pertag->curtag;
+ for (i=0; !(newtagset & 1 << i); i++) ;
+ selmon->pertag->curtag = i + 1;
+ }
selmon->tagset[selmon->seltags] = newtagset;
+
+ /* apply settings for this view */
+ selmon->nmaster = selmon->pertag->nmasters[selmon->pertag->curtag];
+ selmon->mfact = selmon->pertag->mfacts[selmon->pertag->curtag];
+ selmon->sellt = selmon->pertag->sellts[selmon->pertag->curtag];
+ selmon->lt[selmon->sellt] = selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt];
+ selmon->lt[selmon->sellt^1] = selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt^1];
+ if (selmon->showbar != selmon->pertag->showbars[selmon->pertag->curtag])
+ togglebar(NULL);
focus(NULL);
arrange(selmon);
} }
selmon->nmaster = selmon->pertag->nmasters[selmon->pertag->curtag]; @@ -2035,11 +2097,38 @@ updatewmhints(Client *c)
void
view(const Arg *arg)
{
+ int i;
+ unsigned int tmptag;
+
if ((arg->ui & TAGMASK) == selmon->tagset[selmon->seltags])
return;
selmon->seltags ^= 1; /* toggle sel tagset */
- if (arg->ui & TAGMASK)
+ if (arg->ui & TAGMASK) {
+ selmon->pertag->prevtag = selmon->pertag->curtag;
selmon->tagset[selmon->seltags] = arg->ui & TAGMASK;
+ if (arg->ui == ~0)
+ selmon->pertag->curtag = 0;
+ else {
+ for (i=0; !(arg->ui & 1 << i); i++) ;
+ selmon->pertag->curtag = i + 1;
+ }
+ } else {
+ tmptag = selmon->pertag->prevtag;
+ selmon->pertag->prevtag = selmon->pertag->curtag;
+ selmon->pertag->curtag = tmptag;
+ }
+ selmon->nmaster = selmon->pertag->nmasters[selmon->pertag->curtag];
+ selmon->nstack = selmon->pertag->nstacks[selmon->pertag->curtag]; + selmon->nstack = selmon->pertag->nstacks[selmon->pertag->curtag];
selmon->mfact = selmon->pertag->mfacts[selmon->pertag->curtag]; + selmon->mfact = selmon->pertag->mfacts[selmon->pertag->curtag];
selmon->sellt = selmon->pertag->sellts[selmon->pertag->curtag]; + selmon->sellt = selmon->pertag->sellts[selmon->pertag->curtag];
selmon->lt[selmon->sellt] = selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt]; + selmon->lt[selmon->sellt] = selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt];
selmon->lt[selmon->sellt^1] = selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt^1]; + selmon->lt[selmon->sellt^1] = selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt^1];
+ selmon->ltaxis[LAYOUT] = selmon->pertag->ltaxis[selmon->pertag->curtag][LAYOUT]; + selmon->ltaxis[LAYOUT] = selmon->pertag->ltaxis[selmon->pertag->curtag][LAYOUT];
+ selmon->ltaxis[MASTER] = selmon->pertag->ltaxis[selmon->pertag->curtag][MASTER]; + selmon->ltaxis[MASTER] = selmon->pertag->ltaxis[selmon->pertag->curtag][MASTER];
+ selmon->ltaxis[STACK] = selmon->pertag->ltaxis[selmon->pertag->curtag][STACK]; + selmon->ltaxis[STACK] = selmon->pertag->ltaxis[selmon->pertag->curtag][STACK];
+ selmon->ltaxis[STACK2] = selmon->pertag->ltaxis[selmon->pertag->curtag][STACK2]; + selmon->ltaxis[STACK2] = selmon->pertag->ltaxis[selmon->pertag->curtag][STACK2];
if (selmon->showbar != selmon->pertag->showbars[selmon->pertag->curtag]) + if (selmon->showbar != selmon->pertag->showbars[selmon->pertag->curtag])
togglebar(NULL); + togglebar(NULL);
focus(NULL); focus(NULL);
arrange(selmon);
}
diff --git a/flextile-deluxe.c b/flextile-deluxe.c diff --git a/flextile-deluxe.c b/flextile-deluxe.c
new file mode 100644 new file mode 100644
index 0000000..7d5766a index 0000000..7d265e5
--- /dev/null --- /dev/null
+++ b/flextile-deluxe.c +++ b/flextile-deluxe.c
@@ -0,0 +1,727 @@ @@ -0,0 +1,727 @@
@ -953,11 +869,11 @@ index 0000000..7d5766a
+ +
+ for (i = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) { + for (i = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) {
+ if (i >= ai && i < (ai + an)) { + if (i >= ai && i < (ai + an)) {
+ if (cc/rows + 1 > cols - an%cols) { + if (cc/rows + 1 > cols - an%cols) {
+ rows = an/cols + 1; + rows = an/cols + 1;
+ ch = (h - ih * (rows - 1)) / rows; + ch = (h - ih * (rows - 1)) / rows;
+ rrest = (h - ih * (rows - 1)) - ch * rows; + rrest = (h - ih * (rows - 1)) - ch * rows;
+ } + }
+ resize(c, + resize(c,
+ x, + x,
+ y + rn*(ch + ih) + MIN(rn, rrest), + y + rn*(ch + ih) + MIN(rn, rrest),
@ -1352,5 +1268,5 @@ index 0000000..b0aadd4
+ 64, // "@", + 64, // "@",
+}; +};
-- --
2.17.1 2.19.1

@ -1,4 +1,4 @@
From 6d5d6363d9841d812d762dce70bf9e8962a92ab2 Mon Sep 17 00:00:00 2001 From fdc70c7b54add4c668fa3ae7458e4c5f5e1bd854 Mon Sep 17 00:00:00 2001
From: bakkeby <bakkeby@gmail.com> From: bakkeby <bakkeby@gmail.com>
Date: Tue, 7 Apr 2020 12:34:15 +0200 Date: Tue, 7 Apr 2020 12:34:15 +0200
Subject: [PATCH 1/2] pertag patch, keeps layout, mwfact, barpos and nmaster Subject: [PATCH 1/2] pertag patch, keeps layout, mwfact, barpos and nmaster
@ -192,10 +192,10 @@ index 4465af1..4578b1c 100644
arrange(selmon); arrange(selmon);
} }
-- --
2.17.1 2.19.1
From a895591cf19f1230c15adf8c1ebbdd5dea4a490d Mon Sep 17 00:00:00 2001 From d9754b776789858914525dc457a84f8bc1b5f640 Mon Sep 17 00:00:00 2001
From: bakkeby <bakkeby@gmail.com> From: bakkeby <bakkeby@gmail.com>
Date: Sun, 26 Apr 2020 11:35:53 +0200 Date: Sun, 26 Apr 2020 11:35:53 +0200
Subject: [PATCH 2/2] Monitor rules patch on top of pertag Subject: [PATCH 2/2] Monitor rules patch on top of pertag
@ -325,5 +325,5 @@ index 4578b1c..22a657f 100644
return m; return m;
} }
-- --
2.17.1 2.19.1

@ -1,4 +1,4 @@
From 80867c7d8c8186972f16e230e2910b20b4296895 Mon Sep 17 00:00:00 2001 From 7e64cf33b56a4ad51a12f6e391c224defdf62255 Mon Sep 17 00:00:00 2001
From: bakkeby <bakkeby@gmail.com> From: bakkeby <bakkeby@gmail.com>
Date: Tue, 7 Apr 2020 12:36:21 +0200 Date: Tue, 7 Apr 2020 12:36:21 +0200
Subject: [PATCH] Resize a floating window from any corner Subject: [PATCH] Resize a floating window from any corner
@ -85,5 +85,5 @@ index 4465af1..9922271 100644
while (XCheckMaskEvent(dpy, EnterWindowMask, &ev)); while (XCheckMaskEvent(dpy, EnterWindowMask, &ev));
if ((m = recttomon(c->x, c->y, c->w, c->h)) != selmon) { if ((m = recttomon(c->x, c->y, c->w, c->h)) != selmon) {
-- --
2.17.1 2.19.1

@ -1,4 +1,4 @@
From ce8b86167696bf5ffd3048dfee61f8e0f7949e67 Mon Sep 17 00:00:00 2001 From c436c07d84169722db601ad9359b20c943551b6c Mon Sep 17 00:00:00 2001
From: bakkeby <bakkeby@gmail.com> From: bakkeby <bakkeby@gmail.com>
Date: Tue, 7 Apr 2020 12:35:26 +0200 Date: Tue, 7 Apr 2020 12:35:26 +0200
Subject: [PATCH] rotatestack, allows you to scroll through the stack Subject: [PATCH] rotatestack, allows you to scroll through the stack
@ -117,5 +117,5 @@ index 4465af1..cf76ad3 100644
run(void) run(void)
{ {
-- --
2.17.1 2.19.1

@ -1,4 +1,4 @@
From 947edb123d4f77357ca0d72a7ed2c121075e0d86 Mon Sep 17 00:00:00 2001 From d8a4a789342073568f7e49d48a71c66b0c874aa1 Mon Sep 17 00:00:00 2001
From: bakkeby <bakkeby@gmail.com> From: bakkeby <bakkeby@gmail.com>
Date: Tue, 7 Apr 2020 11:36:24 +0200 Date: Tue, 7 Apr 2020 11:36:24 +0200
Subject: [PATCH] Savefloats, saves size and position of floating windows Subject: [PATCH] Savefloats, saves size and position of floating windows
@ -51,5 +51,5 @@ index 4465af1..96b0b26 100644
} }
-- --
2.17.1 2.19.1

@ -1,4 +1,4 @@
From acd90dee6b92a98e8e681c266e055574efebf20c Mon Sep 17 00:00:00 2001 From cbbbff711a466286ef2b03af6af73a55800b98ee Mon Sep 17 00:00:00 2001
From: bakkeby <bakkeby@gmail.com> From: bakkeby <bakkeby@gmail.com>
Date: Tue, 7 Apr 2020 11:34:11 +0200 Date: Tue, 7 Apr 2020 11:34:11 +0200
Subject: [PATCH] Adding single tagset Subject: [PATCH] Adding single tagset
@ -537,5 +537,5 @@ index 4465af1..b3e8de3 100644
pop(c); pop(c);
} }
-- --
2.17.1 2.19.1

@ -50,5 +50,5 @@ index 4465af1..35e8275 100644
/* init atoms */ /* init atoms */
utf8string = XInternAtom(dpy, "UTF8_STRING", False); utf8string = XInternAtom(dpy, "UTF8_STRING", False);
-- --
2.17.1 2.19.1

@ -67,5 +67,5 @@ index 4465af1..9e727fc 100644
} }
if (ch.res_class) if (ch.res_class)
-- --
2.17.1 2.19.1

@ -1,4 +1,4 @@
From fbfac511101aeec9d0559c2f914a13ec63a42d9f Mon Sep 17 00:00:00 2001 From 555cd85ea1d3b555a0523f87cf718f7ee0227cab Mon Sep 17 00:00:00 2001
From: bakkeby <bakkeby@gmail.com> From: bakkeby <bakkeby@gmail.com>
Date: Tue, 7 Apr 2020 11:32:02 +0200 Date: Tue, 7 Apr 2020 11:32:02 +0200
Subject: [PATCH] Adding systray patch Subject: [PATCH] Adding systray patch
@ -738,5 +738,5 @@ index 4465af1..ba7fae3 100644
zoom(const Arg *arg) zoom(const Arg *arg)
{ {
-- --
2.17.1 2.19.1

@ -1,4 +1,4 @@
From 4e43b3e8d60a16ab63cfff480e073a44f4abfeec Mon Sep 17 00:00:00 2001 From 24b096ef83d05de74b3d91c25e799f2906a0bac1 Mon Sep 17 00:00:00 2001
From: bakkeby <bakkeby@gmail.com> From: bakkeby <bakkeby@gmail.com>
Date: Tue, 7 Apr 2020 12:02:43 +0200 Date: Tue, 7 Apr 2020 12:02:43 +0200
Subject: [PATCH] tagallmon, move all visible windows to an adjacent monitor Subject: [PATCH] tagallmon, move all visible windows to an adjacent monitor
@ -73,5 +73,5 @@ index 4465af1..5048970 100644
tile(Monitor *m) tile(Monitor *m)
{ {
-- --
2.17.1 2.19.1

@ -1,4 +1,4 @@
From edc41b929baa1858f0b16fff8c69ac598afebbb1 Mon Sep 17 00:00:00 2001 From e74ccf3918f4628d6995af3aa38d47fe17a6cc3b Mon Sep 17 00:00:00 2001
From: bakkeby <bakkeby@gmail.com> From: bakkeby <bakkeby@gmail.com>
Date: Tue, 7 Apr 2020 12:04:11 +0200 Date: Tue, 7 Apr 2020 12:04:11 +0200
Subject: [PATCH] tagmonfixfs: Allow moving a fullscreen window to another Subject: [PATCH] tagmonfixfs: Allow moving a fullscreen window to another
@ -33,5 +33,5 @@ index 4465af1..39cece0 100644
void void
-- --
2.17.1 2.19.1

@ -1,4 +1,4 @@
From 4029057010e010127850fc9fb6f6c354353d871d Mon Sep 17 00:00:00 2001 From 8a7910595e9aa93e9af8ff6e433683f26f8cde4a Mon Sep 17 00:00:00 2001
From: bakkeby <bakkeby@gmail.com> From: bakkeby <bakkeby@gmail.com>
Date: Tue, 7 Apr 2020 12:41:35 +0200 Date: Tue, 7 Apr 2020 12:41:35 +0200
Subject: [PATCH] tagswapmon, swap all visible windows with those of one of the Subject: [PATCH] tagswapmon, swap all visible windows with those of one of the
@ -103,5 +103,5 @@ index 4465af1..862eaf7 100644
tile(Monitor *m) tile(Monitor *m)
{ {
-- --
2.17.1 2.19.1

@ -1,4 +1,4 @@
From 0c9b3c039c523a4a433f13031639d86e64e5e70c Mon Sep 17 00:00:00 2001 From af8c9d2e1b0ad8c686cbacc46a296d7f91e00e2e Mon Sep 17 00:00:00 2001
From: bakkeby <bakkeby@gmail.com> From: bakkeby <bakkeby@gmail.com>
Date: Tue, 7 Apr 2020 12:25:58 +0200 Date: Tue, 7 Apr 2020 12:25:58 +0200
Subject: [PATCH] togglefullscreen, allows you to toggle fullscreen on and off Subject: [PATCH] togglefullscreen, allows you to toggle fullscreen on and off
@ -49,5 +49,5 @@ index 4465af1..bcc6ce2 100644
toggletag(const Arg *arg) toggletag(const Arg *arg)
{ {
-- --
2.17.1 2.19.1

@ -1,4 +1,4 @@
From c6bb6a4f5c8206a5cf0d1460e52c1f0776c3b483 Mon Sep 17 00:00:00 2001 From 4ab9c0daea10cc519f764612040d5d4f901700ab Mon Sep 17 00:00:00 2001
From: bakkeby <bakkeby@gmail.com> From: bakkeby <bakkeby@gmail.com>
Date: Tue, 7 Apr 2020 12:43:06 +0200 Date: Tue, 7 Apr 2020 12:43:06 +0200
Subject: [PATCH] Adding window role rule Subject: [PATCH] Adding window role rule
@ -81,5 +81,5 @@ index 4465af1..f2cf8ed 100644
netatom[NetSupported] = XInternAtom(dpy, "_NET_SUPPORTED", False); netatom[NetSupported] = XInternAtom(dpy, "_NET_SUPPORTED", False);
netatom[NetWMName] = XInternAtom(dpy, "_NET_WM_NAME", False); netatom[NetWMName] = XInternAtom(dpy, "_NET_WM_NAME", False);
-- --
2.17.1 2.19.1

@ -1,4 +1,4 @@
From 9e67b8a4fd30635d9d30d62948d458c243d7c056 Mon Sep 17 00:00:00 2001 From 29d0e6a66b9151410b81460dfe919542e9771936 Mon Sep 17 00:00:00 2001
From: bakkeby <bakkeby@gmail.com> From: bakkeby <bakkeby@gmail.com>
Date: Tue, 7 Apr 2020 11:45:42 +0200 Date: Tue, 7 Apr 2020 11:45:42 +0200
Subject: [PATCH] zoomswap, swap positions when a window becomes the new master Subject: [PATCH] zoomswap, swap positions when a window becomes the new master
@ -102,5 +102,5 @@ index 4465af1..49dfda2 100644
int int
-- --
2.17.1 2.19.1

Loading…
Cancel
Save