From dceece64ad5e0a051d71bc0a265be5ea9288db45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Hern=C3=A1ndez=20Hern=C3=A1ndez?= Date: Thu, 13 Jun 2024 14:16:13 -0600 Subject: [PATCH] update hide-behind monocle additionally CR+LF -> LF Fixes: https://codeberg.org/dwl/dwl-patches/issues/50 --- patches/hide-behind-monocle/README.md | 18 +++--- .../hide-behind-monocle.patch | 55 ++++++++++--------- 2 files changed, 38 insertions(+), 35 deletions(-) diff --git a/patches/hide-behind-monocle/README.md b/patches/hide-behind-monocle/README.md index 1e2db0e..b11e969 100644 --- a/patches/hide-behind-monocle/README.md +++ b/patches/hide-behind-monocle/README.md @@ -1,9 +1,9 @@ -### Description -Hide all clients behind the focused one in the monocle layout - -### Download -- [git branch](https://codeberg.org/sevz/dwl/src/branch/hide-behind-monocle) -- [2024-06-07](https://codeberg.org/dwl/dwl-patches/raw/branch/main/patches/hide-behind-monocle/hide-behind-monocle.patch) - -### Authors -- [sevz](https://codeberg.org/sevz) +### Description +Hide all clients behind the focused one in the monocle layout + +### Download +- [git branch](https://codeberg.org/sevz/dwl/src/branch/hide-behind-monocle) +- [2024-06-13](https://codeberg.org/dwl/dwl-patches/raw/branch/main/patches/hide-behind-monocle/hide-behind-monocle.patch) + +### Authors +- [sevz](https://codeberg.org/sevz) diff --git a/patches/hide-behind-monocle/hide-behind-monocle.patch b/patches/hide-behind-monocle/hide-behind-monocle.patch index a6443dd..04ae545 100644 --- a/patches/hide-behind-monocle/hide-behind-monocle.patch +++ b/patches/hide-behind-monocle/hide-behind-monocle.patch @@ -1,4 +1,4 @@ -From cd89b1f0c2cc9f5cb7a33d332854f56448616611 Mon Sep 17 00:00:00 2001 +From 9a6e047aec3aa32de1684913ad6f73c51c7c8af0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Hern=C3=A1ndez=20Hern=C3=A1ndez?= Date: Sat, 8 Jul 2023 17:25:16 -0600 @@ -9,11 +9,11 @@ Content-Transfer-Encoding: 8bit Signed-off-by: Leonardo Hernández Hernández --- - dwl.c | 84 ++++++++++++++++++++++++++++++++++++----------------------- - 1 file changed, 52 insertions(+), 32 deletions(-) + dwl.c | 87 +++++++++++++++++++++++++++++++++++++---------------------- + 1 file changed, 55 insertions(+), 32 deletions(-) diff --git a/dwl.c b/dwl.c -index 6f041a0d..8c1abc6c 100644 +index 6f041a0d..4c8bf755 100644 --- a/dwl.c +++ b/dwl.c @@ -284,9 +284,10 @@ static Monitor *dirtomon(enum wlr_direction dir); @@ -69,7 +69,7 @@ index 6f041a0d..8c1abc6c 100644 client_notify_enter(surface->surface, wlr_seat_get_keyboard(seat)); } else if (!locked) { - focusclient(focustop(selmon), 1); -+ focusclient(focustop(selmon, 0), 1); ++ focusclient(focustop(selmon, 0), 1); } else { wlr_seat_keyboard_clear_focus(seat); } @@ -116,7 +116,7 @@ index 6f041a0d..8c1abc6c 100644 } return NULL; } -@@ -1451,6 +1456,22 @@ handlesig(int signo) +@@ -1451,6 +1456,25 @@ handlesig(int signo) } } @@ -125,8 +125,11 @@ index 6f041a0d..8c1abc6c 100644 +{ + Client *c; + if (m && m->lt[m->sellt]->arrange == monocle) { -+ wl_list_for_each(c, &clients, link) ++ wl_list_for_each(c, &clients, link) { ++ if (c->mon != m) ++ continue; + wlr_scene_node_set_enabled(&c->scene->node, VISIBLEON(c, m) && c->isfloating); ++ } + + c = NULL; + @@ -139,7 +142,7 @@ index 6f041a0d..8c1abc6c 100644 void incnmaster(const Arg *arg) { -@@ -1589,7 +1610,7 @@ keyrepeat(void *data) +@@ -1589,7 +1613,7 @@ keyrepeat(void *data) void killclient(const Arg *arg) { @@ -148,7 +151,7 @@ index 6f041a0d..8c1abc6c 100644 if (sel) client_send_close(sel); } -@@ -1722,8 +1743,7 @@ monocle(Monitor *m) +@@ -1722,8 +1746,7 @@ monocle(Monitor *m) } if (n) snprintf(m->ltsymbol, LENGTH(m->ltsymbol), "[%d]", n); @@ -158,7 +161,7 @@ index 6f041a0d..8c1abc6c 100644 } void -@@ -1984,7 +2004,7 @@ printstatus(void) +@@ -1984,7 +2007,7 @@ printstatus(void) if (c->isurgent) urg |= c->tags; } @@ -167,7 +170,7 @@ index 6f041a0d..8c1abc6c 100644 title = client_get_title(c); appid = client_get_appid(c); printf("%s title %s\n", m->wlr_output->name, title ? title : broken); -@@ -2305,7 +2325,7 @@ setmon(Client *c, Monitor *m, uint32_t newtags) +@@ -2305,7 +2328,7 @@ setmon(Client *c, Monitor *m, uint32_t newtags) setfullscreen(c, c->isfullscreen); /* This will call arrange(c->mon) */ setfloating(c, c->isfloating); } @@ -176,7 +179,7 @@ index 6f041a0d..8c1abc6c 100644 } void -@@ -2568,12 +2588,12 @@ startdrag(struct wl_listener *listener, void *data) +@@ -2568,12 +2591,12 @@ startdrag(struct wl_listener *listener, void *data) void tag(const Arg *arg) { @@ -191,7 +194,7 @@ index 6f041a0d..8c1abc6c 100644 arrange(selmon); printstatus(); } -@@ -2581,7 +2601,7 @@ tag(const Arg *arg) +@@ -2581,7 +2604,7 @@ tag(const Arg *arg) void tagmon(const Arg *arg) { @@ -200,7 +203,7 @@ index 6f041a0d..8c1abc6c 100644 if (sel) setmon(sel, dirtomon(arg->i), 0); } -@@ -2623,7 +2643,7 @@ tile(Monitor *m) +@@ -2623,7 +2646,7 @@ tile(Monitor *m) void togglefloating(const Arg *arg) { @@ -209,7 +212,7 @@ index 6f041a0d..8c1abc6c 100644 /* return if fullscreen */ if (sel && !sel->isfullscreen) setfloating(sel, !sel->isfloating); -@@ -2632,7 +2652,7 @@ togglefloating(const Arg *arg) +@@ -2632,7 +2655,7 @@ togglefloating(const Arg *arg) void togglefullscreen(const Arg *arg) { @@ -218,7 +221,7 @@ index 6f041a0d..8c1abc6c 100644 if (sel) setfullscreen(sel, !sel->isfullscreen); } -@@ -2641,12 +2661,12 @@ void +@@ -2641,12 +2664,12 @@ void toggletag(const Arg *arg) { uint32_t newtags; @@ -233,7 +236,7 @@ index 6f041a0d..8c1abc6c 100644 arrange(selmon); printstatus(); } -@@ -2659,7 +2679,7 @@ toggleview(const Arg *arg) +@@ -2659,7 +2682,7 @@ toggleview(const Arg *arg) return; selmon->tagset[selmon->seltags] = newtagset; @@ -242,7 +245,7 @@ index 6f041a0d..8c1abc6c 100644 arrange(selmon); printstatus(); } -@@ -2683,7 +2703,7 @@ unmaplayersurfacenotify(struct wl_listener *listener, void *data) +@@ -2683,7 +2706,7 @@ unmaplayersurfacenotify(struct wl_listener *listener, void *data) if (l->layer_surface->output && (l->mon = l->layer_surface->output->data)) arrangelayers(l->mon); if (l->layer_surface->surface == seat->keyboard_state.focused_surface) @@ -251,7 +254,7 @@ index 6f041a0d..8c1abc6c 100644 motionnotify(0, NULL, 0, 0, 0, 0); } -@@ -2700,7 +2720,7 @@ unmapnotify(struct wl_listener *listener, void *data) +@@ -2700,7 +2723,7 @@ unmapnotify(struct wl_listener *listener, void *data) if (client_is_unmanaged(c)) { if (c == exclusive_focus) { exclusive_focus = NULL; @@ -260,7 +263,7 @@ index 6f041a0d..8c1abc6c 100644 } } else { wl_list_remove(&c->link); -@@ -2781,7 +2801,7 @@ updatemons(struct wl_listener *listener, void *data) +@@ -2781,7 +2804,7 @@ updatemons(struct wl_listener *listener, void *data) /* Don't move clients to the left output when plugging monitors */ arrange(m); /* make sure fullscreen clients have the right size */ @@ -269,7 +272,7 @@ index 6f041a0d..8c1abc6c 100644 resize(c, m->m, 0); /* Try to re-set the gamma LUT when updating monitors, -@@ -2797,7 +2817,7 @@ updatemons(struct wl_listener *listener, void *data) +@@ -2797,7 +2820,7 @@ updatemons(struct wl_listener *listener, void *data) if (!c->mon && client_surface(c)->mapped) setmon(c, selmon, c->tags); } @@ -278,7 +281,7 @@ index 6f041a0d..8c1abc6c 100644 if (selmon->lock_surface) { client_notify_enter(selmon->lock_surface->surface, wlr_seat_get_keyboard(seat)); -@@ -2819,7 +2839,7 @@ void +@@ -2819,7 +2842,7 @@ void updatetitle(struct wl_listener *listener, void *data) { Client *c = wl_container_of(listener, c, set_title); @@ -287,7 +290,7 @@ index 6f041a0d..8c1abc6c 100644 printstatus(); } -@@ -2829,7 +2849,7 @@ urgent(struct wl_listener *listener, void *data) +@@ -2829,7 +2852,7 @@ urgent(struct wl_listener *listener, void *data) struct wlr_xdg_activation_v1_request_activate_event *event = data; Client *c = NULL; toplevel_from_wlr_surface(event->surface, &c, NULL); @@ -296,7 +299,7 @@ index 6f041a0d..8c1abc6c 100644 return; c->isurgent = 1; -@@ -2847,7 +2867,7 @@ view(const Arg *arg) +@@ -2847,7 +2870,7 @@ view(const Arg *arg) selmon->seltags ^= 1; /* toggle sel tagset */ if (arg->ui & TAGMASK) selmon->tagset[selmon->seltags] = arg->ui & TAGMASK; @@ -305,7 +308,7 @@ index 6f041a0d..8c1abc6c 100644 arrange(selmon); printstatus(); } -@@ -2918,7 +2938,7 @@ xytonode(double x, double y, struct wlr_surface **psurface, +@@ -2918,7 +2941,7 @@ xytonode(double x, double y, struct wlr_surface **psurface, void zoom(const Arg *arg) { @@ -314,7 +317,7 @@ index 6f041a0d..8c1abc6c 100644 if (!sel || !selmon || !selmon->lt[selmon->sellt]->arrange || sel->isfloating) return; -@@ -3035,7 +3055,7 @@ sethints(struct wl_listener *listener, void *data) +@@ -3035,7 +3058,7 @@ sethints(struct wl_listener *listener, void *data) { Client *c = wl_container_of(listener, c, set_hints); struct wlr_surface *surface = client_surface(c);