commit 5b636035b2fdafa3afcaff80dc9d59c3261e3e60
parent 0750c18c3831147b07272b25cc560636b7f56417
Author: AndrewLockVI <andrew@laack.co>
Date: Sun, 23 Feb 2025 16:33:45 -0600
Created my own attach bottom patch
Diffstat:
| M | dvtm.c | | | 34 | +++++++++++++++++++++++++++++++--- |
1 file changed, 31 insertions(+), 3 deletions(-)
diff --git a/dvtm.c b/dvtm.c
@@ -508,6 +508,11 @@ arrange(void) {
draw_all();
}
+
+
+
+
+
static void
attach(Client *c) {
if (clients)
@@ -537,6 +542,28 @@ attachafter(Client *c, Client *a) { /* attach c after a */
}
}
+
+void
+attachbottom(Client *c)
+{
+ // Find the last client in the clients list
+ Client *last = clients;
+ while (last && last->next) {
+ last = last->next;
+ }
+
+ // Attach the new client after the last client (if the list is not empty)
+ if (last) {
+ attachafter(c, last);
+ } else {
+ // If the list is empty, just attach the client normally
+ attach(c);
+ }
+}
+
+
+
+
static void
attachstack(Client *c) {
c->snext = stack;
@@ -1100,11 +1127,11 @@ create(const char *args[]) {
c->x = wax;
c->y = way;
debug("client with pid %d forked\n", c->pid);
- attach(c);
+ //attach(c);
+
+ attachbottom(c);
focus(c);
arrange();
- zoom(NULL);
- focus(c);
}
static void
@@ -1951,3 +1978,4 @@ main(int argc, char *argv[]) {
cleanup();
return 0;
}
+