commit 521ea52c1da1dfbefb3b65d30f338d9522e07253
Author: Jan Friesse <jfriesse@gmail.com>
Date:   Sat May 1 11:16:37 2010 +0200

    Ability to open new tab as last one

diff --git a/config.def.h b/config.def.h
index 402cf25..29804bd 100644
--- a/config.def.h
+++ b/config.def.h
@@ -7,6 +7,7 @@ static const char *before      = "<";
 static const char *after       = ">";
 static const int tabwidth      = 200;
 static const Bool foreground   = False;
+static const Bool newaslast    = False;
 
 #define MODKEY ControlMask
 static Key keys[] = { \
diff --git a/tabbed.c b/tabbed.c
index 048ab37..357dfa6 100644
--- a/tabbed.c
+++ b/tabbed.c
@@ -568,7 +568,7 @@ manage(Window w) {
 		int i, j;
 		unsigned int modifiers[] = { 0, LockMask, numlockmask, numlockmask|LockMask };
 		KeyCode code;
-		Client *c;
+		Client *c, *lc;
 		XEvent e;
 
 		XWithdrawWindow(dpy, w, 0);
@@ -582,9 +582,14 @@ manage(Window w) {
 						 True, GrabModeAsync, GrabModeAsync);
 		}
 		c = emallocz(sizeof(Client));
-		c->next = clients;
 		c->win = w;
-		clients = c;
+		if (newaslast && clients != NULL) {
+			for (lc = clients; lc->next != NULL; lc = lc->next) ;
+			lc->next = c;
+		} else {
+			c->next = clients;
+			clients = c;
+		}
 		updatetitle(c);
 		drawbar();
 		XMapRaised(dpy, w);
