mirror of
https://codeberg.org/dwl/dwl-patches.git
synced 2026-03-22 08:51:31 +00:00
Add dwindle layout patch
This commit is contained in:
parent
06ef8524bb
commit
ce4ffdd6af
@ -1,12 +1,13 @@
|
|||||||
From e985b17e951f326e1459601cc39893609058c5ed Mon Sep 17 00:00:00 2001
|
From 3240c7fdfb12403d75a06ce567357a0df74b280f Mon Sep 17 00:00:00 2001
|
||||||
From: C4FE1 <heitorcdesousa13@gmail.com>
|
From: C4FE1 <heitorcdesousa13@gmail.com>
|
||||||
Date: Fri, 20 Mar 2026 21:07:24 -0300
|
Date: Fri, 20 Mar 2026 21:30:41 -0300
|
||||||
Subject: [PATCH] dwl: add dwindle layout
|
Subject: [PATCH] dwl: add dwindle layout
|
||||||
|
|
||||||
|
dwl: add dwindle layout
|
||||||
---
|
---
|
||||||
config.def.h | 1 +
|
config.def.h | 1 +
|
||||||
dwl.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
|
dwl.c | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
2 files changed, 52 insertions(+)
|
2 files changed, 54 insertions(+)
|
||||||
|
|
||||||
diff --git a/config.def.h b/config.def.h
|
diff --git a/config.def.h b/config.def.h
|
||||||
index 8a6eda0..e1b823e 100644
|
index 8a6eda0..e1b823e 100644
|
||||||
@ -21,7 +22,7 @@ index 8a6eda0..e1b823e 100644
|
|||||||
{ "[M]", monocle },
|
{ "[M]", monocle },
|
||||||
};
|
};
|
||||||
diff --git a/dwl.c b/dwl.c
|
diff --git a/dwl.c b/dwl.c
|
||||||
index 101a45f..3b08073 100644
|
index 101a45f..5f1b762 100644
|
||||||
--- a/dwl.c
|
--- a/dwl.c
|
||||||
+++ b/dwl.c
|
+++ b/dwl.c
|
||||||
@@ -335,6 +335,7 @@ static void startdrag(struct wl_listener *listener, void *data);
|
@@ -335,6 +335,7 @@ static void startdrag(struct wl_listener *listener, void *data);
|
||||||
@ -32,7 +33,7 @@ index 101a45f..3b08073 100644
|
|||||||
static void togglefloating(const Arg *arg);
|
static void togglefloating(const Arg *arg);
|
||||||
static void togglefullscreen(const Arg *arg);
|
static void togglefullscreen(const Arg *arg);
|
||||||
static void toggletag(const Arg *arg);
|
static void toggletag(const Arg *arg);
|
||||||
@@ -2745,6 +2746,56 @@ tile(Monitor *m)
|
@@ -2745,6 +2746,58 @@ tile(Monitor *m)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -40,6 +41,8 @@ index 101a45f..3b08073 100644
|
|||||||
+dwindle(Monitor *m)
|
+dwindle(Monitor *m)
|
||||||
+{
|
+{
|
||||||
+ unsigned int i, n = 0;
|
+ unsigned int i, n = 0;
|
||||||
|
+ int nx, ny, nw, nh;
|
||||||
|
+ int horizontal;
|
||||||
+ Client *c;
|
+ Client *c;
|
||||||
+
|
+
|
||||||
+ /* count clients */
|
+ /* count clients */
|
||||||
@ -50,12 +53,12 @@ index 101a45f..3b08073 100644
|
|||||||
+ if (n == 0)
|
+ if (n == 0)
|
||||||
+ return;
|
+ return;
|
||||||
+
|
+
|
||||||
+ int nx = m->w.x;
|
+ nx = m->w.x;
|
||||||
+ int ny = m->w.y;
|
+ ny = m->w.y;
|
||||||
+ int nw = m->w.width;
|
+ nw = m->w.width;
|
||||||
+ int nh = m->w.height;
|
+ nh = m->w.height;
|
||||||
+
|
+
|
||||||
+ int horizontal = 1; // toggle split direction
|
+ horizontal = 1; // toggle split direction
|
||||||
+ i = 0;
|
+ i = 0;
|
||||||
+
|
+
|
||||||
+ wl_list_for_each(c, &clients, link) {
|
+ wl_list_for_each(c, &clients, link) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user