From 65ea99519bbf7a52f48932aea7385f81f8b30867 Mon Sep 17 00:00:00 2001 From: wochap Date: Wed, 31 Jul 2024 13:32:12 +0000 Subject: [PATCH] update to v0.6 fix https://codeberg.org/dwl/dwl-patches/issues/112 --- patches/pertag/pertag.patch | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/patches/pertag/pertag.patch b/patches/pertag/pertag.patch index 50fac90..971732a 100644 --- a/patches/pertag/pertag.patch +++ b/patches/pertag/pertag.patch @@ -1,6 +1,6 @@ -From c076f18beddb7c0b1714a638143294febcd94ed1 Mon Sep 17 00:00:00 2001 +From d3b551ffe3ec85e16341962e322150b81af6722f Mon Sep 17 00:00:00 2001 From: wochap -Date: Thu, 11 Apr 2024 15:50:00 -0500 +Date: Wed, 31 Jul 2024 08:27:26 -0500 Subject: [PATCH] makes layout, mwfact and nmaster individual for every tag inspiration: https://github.com/djpohly/dwl/wiki/pertag @@ -9,10 +9,10 @@ inspiration: https://github.com/djpohly/dwl/wiki/pertag 1 file changed, 70 insertions(+), 5 deletions(-) diff --git a/dwl.c b/dwl.c -index bf763df..99e2550 100644 +index 145fd01..2f364bc 100644 --- a/dwl.c +++ b/dwl.c -@@ -101,6 +101,7 @@ typedef struct { +@@ -102,6 +102,7 @@ typedef struct { const Arg arg; } Button; @@ -20,7 +20,7 @@ index bf763df..99e2550 100644 typedef struct Monitor Monitor; typedef struct { /* Must keep these three elements in this order */ -@@ -198,6 +199,7 @@ struct Monitor { +@@ -199,6 +200,7 @@ struct Monitor { struct wlr_box w; /* window area, layout-relative */ struct wl_list layers[4]; /* LayerSurface.link */ const Layout *lt[2]; @@ -28,7 +28,7 @@ index bf763df..99e2550 100644 unsigned int seltags; unsigned int sellt; uint32_t tagset[2]; -@@ -424,6 +426,14 @@ static xcb_atom_t netatom[NetLast]; +@@ -427,6 +429,14 @@ static xcb_atom_t netatom[NetLast]; /* attempt to encapsulate suck into one file */ #include "client.h" @@ -43,7 +43,7 @@ index bf763df..99e2550 100644 /* function implementations */ void applybounds(Client *c, struct wlr_box *bbox) -@@ -698,6 +708,7 @@ cleanupmon(struct wl_listener *listener, void *data) +@@ -712,6 +722,7 @@ cleanupmon(struct wl_listener *listener, void *data) wlr_output_layout_remove(output_layout, m->wlr_output); wlr_scene_output_destroy(m->scene_output); @@ -51,7 +51,7 @@ index bf763df..99e2550 100644 closemon(m); wlr_scene_node_destroy(&m->fullscreen_bg->node); free(m); -@@ -915,6 +926,18 @@ createmon(struct wl_listener *listener, void *data) +@@ -983,6 +994,18 @@ createmon(struct wl_listener *listener, void *data) wl_list_insert(&mons, &m->link); printstatus(); @@ -70,7 +70,7 @@ index bf763df..99e2550 100644 /* The xdg-protocol specifies: * * If the fullscreened surface is not opaque, the compositor must make -@@ -1393,7 +1416,7 @@ incnmaster(const Arg *arg) +@@ -1472,7 +1495,7 @@ incnmaster(const Arg *arg) { if (!arg || !selmon) return; @@ -79,7 +79,7 @@ index bf763df..99e2550 100644 arrange(selmon); } -@@ -2198,9 +2221,9 @@ setlayout(const Arg *arg) +@@ -2305,9 +2328,9 @@ setlayout(const Arg *arg) if (!selmon) return; if (!arg || !arg->v || arg->v != selmon->lt[selmon->sellt]) @@ -91,7 +91,7 @@ index bf763df..99e2550 100644 strncpy(selmon->ltsymbol, selmon->lt[selmon->sellt]->symbol, LENGTH(selmon->ltsymbol)); arrange(selmon); printstatus(); -@@ -2217,7 +2240,7 @@ setmfact(const Arg *arg) +@@ -2324,7 +2347,7 @@ setmfact(const Arg *arg) f = arg->f < 1.0f ? arg->f + selmon->mfact : arg->f - 1.0f; if (f < 0.1 || f > 0.9) return; @@ -100,7 +100,7 @@ index bf763df..99e2550 100644 arrange(selmon); } -@@ -2638,9 +2661,29 @@ void +@@ -2701,9 +2724,29 @@ void toggleview(const Arg *arg) { uint32_t newtagset; @@ -108,7 +108,7 @@ index bf763df..99e2550 100644 if (!(newtagset = selmon ? selmon->tagset[selmon->seltags] ^ (arg->ui & TAGMASK) : 0)) return; -+ if (newtagset == TAGMASK) { ++ if (newtagset == (uint32_t)~0) { + selmon->pertag->prevtag = selmon->pertag->curtag; + selmon->pertag->curtag = 0; + } @@ -130,7 +130,7 @@ index bf763df..99e2550 100644 selmon->tagset[selmon->seltags] = newtagset; focusclient(focustop(selmon), 1); arrange(selmon); -@@ -2825,11 +2868,33 @@ urgent(struct wl_listener *listener, void *data) +@@ -2892,11 +2935,33 @@ urgent(struct wl_listener *listener, void *data) void view(const Arg *arg) { @@ -140,7 +140,7 @@ index bf763df..99e2550 100644 return; selmon->seltags ^= 1; /* toggle sel tagset */ - if (arg->ui & TAGMASK) -+ if (arg->ui & TAGMASK) { ++ if (arg->ui & ~0) { selmon->tagset[selmon->seltags] = arg->ui & TAGMASK; + selmon->pertag->prevtag = selmon->pertag->curtag; + @@ -166,4 +166,5 @@ index bf763df..99e2550 100644 arrange(selmon); printstatus(); -- -2.43.2 +2.45.2 +