From 8cbadb61604667b407b53ee1258433994fa4765a Mon Sep 17 00:00:00 2001 From: coasteen Date: Thu, 9 Jul 2026 10:42:28 +0330 Subject: init --- dwl/dwl-patches/patches/attachtop/README.md | 13 ++++++++ dwl/dwl-patches/patches/attachtop/attachtop.patch | 36 +++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100755 dwl/dwl-patches/patches/attachtop/README.md create mode 100755 dwl/dwl-patches/patches/attachtop/attachtop.patch (limited to 'dwl/dwl-patches/patches/attachtop') diff --git a/dwl/dwl-patches/patches/attachtop/README.md b/dwl/dwl-patches/patches/attachtop/README.md new file mode 100755 index 0000000..0241b7d --- /dev/null +++ b/dwl/dwl-patches/patches/attachtop/README.md @@ -0,0 +1,13 @@ +### Description +This is a port of attachtop patch for dwm: https://dwm.suckless.org/patches/attachtop + +New client attaches below the last master/on top of the stack. + +Behavior feels very intuitive as it doesn't disrupt existing masters no matter the amount of them, it only pushes the clients in stack down. + +### Download +- [git branch](https://codeberg.org/nikitaivanov/dwl/src/branch/attachtop) +- [2025-06-16](https://codeberg.org/dwl/dwl-patches/raw/branch/main/patches/attachtop/attachtop.patch) + +### Authors +- [Nikita Ivanov](https://codeberg.org/nikitaivanov) diff --git a/dwl/dwl-patches/patches/attachtop/attachtop.patch b/dwl/dwl-patches/patches/attachtop/attachtop.patch new file mode 100755 index 0000000..d447246 --- /dev/null +++ b/dwl/dwl-patches/patches/attachtop/attachtop.patch @@ -0,0 +1,36 @@ +From 29e6a4bef02c473cc5bd04804fe508bda265077d Mon Sep 17 00:00:00 2001 +From: Nikita Ivanov +Date: Sun, 7 Apr 2024 21:10:17 +0200 +Subject: [PATCH] New client are attached on top of the stack + +--- + dwl.c | 13 ++++++++++++- + 1 file changed, 12 insertions(+), 1 deletion(-) + +diff --git a/dwl.c b/dwl.c +index bf763df..02e3d07 100644 +--- a/dwl.c ++++ b/dwl.c +@@ -1605,7 +1605,18 @@ mapnotify(struct wl_listener *listener, void *data) + c->geom.height += 2 * c->bw; + + /* Insert this client into client lists. */ +- wl_list_insert(&clients, &c->link); ++ i = 0; ++ wl_list_for_each(w, &clients, link) { ++ if (!VISIBLEON(w, selmon) || w->isfloating) ++ continue; ++ p = w; ++ if (++i >= selmon->nmaster) ++ break; ++ } ++ if (i > 0) ++ wl_list_insert(&p->link, &c->link); ++ else ++ wl_list_insert(&clients, &c->link); + wl_list_insert(&fstack, &c->flink); + + /* Set initial monitor, tags, floating status, and focus: +-- +2.49.0 + -- cgit v1.2.3