mirror of
https://codeberg.org/dwl/dwl-patches.git
synced 2025-09-07 11:44:51 +00:00
Add launchtag patch.
This commit is contained in:
parent
609c4d63a7
commit
5ba8f3ced8
14
patches/launchtag/README.md
Normal file
14
patches/launchtag/README.md
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
### Description
|
||||||
|
Straight port of the dwm taglayouts patch, renamed because I have a hard time
|
||||||
|
finding it on the suckless site.
|
||||||
|
|
||||||
|
This patch allows you to set the default layout for each tag.
|
||||||
|
|
||||||
|
This is intended to be applied on top of pertag.
|
||||||
|
|
||||||
|
### Download
|
||||||
|
- [0.7](/dwl/dwl-patches/raw/branch/main/patches/launchtag/launchtag.patch)
|
||||||
|
Use the ^RAW^ patch link here
|
||||||
|
^^^ "0.7" is an example. Use the release that your patch targets
|
||||||
|
### Authors - latest at top
|
||||||
|
- [MayOrMayNotBeACat](https://codeberg.org/MayOrMayNotBeACat)
|
49
patches/launchtag/launchtag.patch
Normal file
49
patches/launchtag/launchtag.patch
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
From 3af0875ecc461af0b61ba31dc33c25544256ae26 Mon Sep 17 00:00:00 2001
|
||||||
|
From: MayOrMayNotBeACat <maybeacat804@gmail.com>
|
||||||
|
Date: Fri, 6 Jun 2025 22:42:16 -0400
|
||||||
|
Subject: [PATCH] Allow initial layout to be set per tag.
|
||||||
|
|
||||||
|
---
|
||||||
|
config.def.h | 1 +
|
||||||
|
dwl.c | 9 ++++++++-
|
||||||
|
2 files changed, 9 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/config.def.h b/config.def.h
|
||||||
|
index 22d2171..0c39007 100644
|
||||||
|
--- a/config.def.h
|
||||||
|
+++ b/config.def.h
|
||||||
|
@@ -16,6 +16,7 @@ static const float fullscreen_bg[] = {0.1f, 0.1f, 0.1f, 1.0f}; /* You ca
|
||||||
|
|
||||||
|
/* tagging - TAGCOUNT must be no greater than 31 */
|
||||||
|
#define TAGCOUNT (9)
|
||||||
|
+static int tag_layout[] = {0, 0, 0, 0, 0, 0, 0, 0, 0};
|
||||||
|
|
||||||
|
/* logging */
|
||||||
|
static int log_level = WLR_ERROR;
|
||||||
|
diff --git a/dwl.c b/dwl.c
|
||||||
|
index d234cd2..4c582f3 100644
|
||||||
|
--- a/dwl.c
|
||||||
|
+++ b/dwl.c
|
||||||
|
@@ -1045,11 +1045,18 @@ createmon(struct wl_listener *listener, void *data)
|
||||||
|
m->pertag->nmasters[i] = m->nmaster;
|
||||||
|
m->pertag->mfacts[i] = m->mfact;
|
||||||
|
|
||||||
|
- m->pertag->ltidxs[i][0] = m->lt[0];
|
||||||
|
+ if (i != 0)
|
||||||
|
+ m->pertag->ltidxs[i][0] = &layouts[tag_layout[i-1]];
|
||||||
|
+ else
|
||||||
|
+ m->pertag->ltidxs[i][0] = m->lt[0];
|
||||||
|
m->pertag->ltidxs[i][1] = m->lt[1];
|
||||||
|
m->pertag->sellts[i] = m->sellt;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ m->lt[0] = m->pertag->ltidxs[0][0];
|
||||||
|
+ m->lt[1] = m->pertag->ltidxs[0][1];
|
||||||
|
+ strncpy(m->ltsymbol, m->pertag->ltidxs[1][0]->symbol, LENGTH(m->ltsymbol));
|
||||||
|
+
|
||||||
|
/* The xdg-protocol specifies:
|
||||||
|
*
|
||||||
|
* If the fullscreened surface is not opaque, the compositor must make
|
||||||
|
--
|
||||||
|
2.49.0
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user