From d98fbd3b0d4275d9b351c127d8f0f6f3e5e2ade6 Mon Sep 17 00:00:00 2001 From: ldev Date: Mon, 22 Jan 2024 15:10:21 +0100 Subject: [PATCH] update patch --- focusdir/focusdir.patch | 66 +++++++++++++++++------------------------ 1 file changed, 27 insertions(+), 39 deletions(-) diff --git a/focusdir/focusdir.patch b/focusdir/focusdir.patch index ed51660..da0ff16 100644 --- a/focusdir/focusdir.patch +++ b/focusdir/focusdir.patch @@ -1,18 +1,18 @@ -From faa496be3c9db01ef03cc196c2aff7fd3c005567 Mon Sep 17 00:00:00 2001 +From a262919c27dca5735441e68f16dc6e03f625c762 Mon Sep 17 00:00:00 2001 From: ldev -Date: Sun, 15 Oct 2023 16:03:39 +0200 -Subject: [PATCH 1/2] focusdir +Date: Mon, 22 Jan 2024 15:01:37 +0100 +Subject: [PATCH] focusdir --- config.def.h | 4 ++++ - dwl.c | 43 +++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 47 insertions(+) + dwl.c | 47 ++++++++++++++++++++++++++++++++++++++++++++++- + 2 files changed, 50 insertions(+), 1 deletion(-) diff --git a/config.def.h b/config.def.h -index 1677f6f..affedd5 100644 +index 9009517..2a1a82e 100644 --- a/config.def.h +++ b/config.def.h -@@ -114,6 +114,10 @@ static const Key keys[] = { +@@ -124,6 +124,10 @@ static const Key keys[] = { { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Return, spawn, {.v = termcmd} }, { MODKEY, XKB_KEY_j, focusstack, {.i = +1} }, { MODKEY, XKB_KEY_k, focusstack, {.i = -1} }, @@ -22,12 +22,20 @@ index 1677f6f..affedd5 100644 + { MODKEY|WLR_MODIFIER_CTRL, XKB_KEY_j, focusdir, {.ui = 3} }, { MODKEY, XKB_KEY_i, incnmaster, {.i = +1} }, { MODKEY, XKB_KEY_d, incnmaster, {.i = -1} }, - { MODKEY, XKB_KEY_h, setmfact, {.f = -0.05} }, + { MODKEY, XKB_KEY_h, setmfact, {.f = -0.05f} }, diff --git a/dwl.c b/dwl.c -index 4118fd8..82ad58c 100644 +index bf02a6d..e051a83 100644 --- a/dwl.c +++ b/dwl.c -@@ -258,6 +258,7 @@ static Monitor *dirtomon(enum wlr_direction dir); +@@ -1,6 +1,7 @@ + /* + * See LICENSE file for copyright and license details. + */ ++#include + #include + #include + #include +@@ -268,6 +269,7 @@ static Monitor *dirtomon(enum wlr_direction dir); static void focusclient(Client *c, int lift); static void focusmon(const Arg *arg); static void focusstack(const Arg *arg); @@ -35,17 +43,21 @@ index 4118fd8..82ad58c 100644 static Client *focustop(Monitor *m); static void fullscreennotify(struct wl_listener *listener, void *data); static void handlesig(int signo); -@@ -1309,6 +1310,48 @@ focusstack(const Arg *arg) - focusclient(c, 1); +@@ -1268,9 +1270,52 @@ focusstack(const Arg *arg) + } + } + /* If only one client is visible on selmon, then c == sel */ +- focusclient(c, 1); ++ focusclient(c, 1); } +void focusdir(const Arg *arg) +{ + /* Focus the left, right, up, down client relative to the current focused client on selmon */ -+ Client *c, *sel = focustop(selmon); ++ Client *c, *sel = focustop(selmon); + if (!sel || sel->isfullscreen) + return; -+ ++ + int dist=INT_MAX; + Client *newsel = NULL; + int newdist=INT_MAX; @@ -80,6 +92,7 @@ index 4118fd8..82ad58c 100644 + focusclient(newsel, 1); + } +} ++ + /* We probably should change the name of this, it sounds like * will focus the topmost client of this mon, when actually will @@ -87,28 +100,3 @@ index 4118fd8..82ad58c 100644 -- 2.43.0 - -From c0881e6b30468bd7758958b561ada4857ff157a5 Mon Sep 17 00:00:00 2001 -From: ldev -Date: Mon, 4 Dec 2023 15:57:10 +0100 -Subject: [PATCH 2/2] added include for limits.h - ---- - dwl.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/dwl.c b/dwl.c -index 227c48c..0e02e28 100644 ---- a/dwl.c -+++ b/dwl.c -@@ -1,6 +1,7 @@ - /* - * See LICENSE file for copyright and license details. - */ -+#include - #include - #include - #include --- -2.43.0 -