[wiki] [sites] tabbed patches: added "clientnumber" patch || Quentin Rameau
commit d318304c366c0397e2ef4ef6df4e6329f95b1164
Author: Quentin Rameau <quinq.ml_AT_gmail.com>
Date: Fri Feb 7 16:21:58 2014 +0100
tabbed patches: added "clientnumber" patch
diff --git a/tools.suckless.org/tabbed/patches/clientnumber.md b/tools.suckless.org/tabbed/patches/clientnumber.md
new file mode 100644
index 0000000..5c357f8
--- /dev/null
+++ b/tools.suckless.org/tabbed/patches/clientnumber.md
_AT_@ -0,0 +1,12 @@
+Client number
+========
+With this patch, tabbed prints the position number of the client before the
+window title.
+
+Download
+--------
+* [tabbed-0.6-clientnumber.diff](tabbed-0.6-clientnumber.diff)
+
+Author
+------
+* Quentin Rameau <quinq_AT_quinq.eu.org>
diff --git a/tools.suckless.org/tabbed/patches/tabbed-0.6-clientnumber.diff b/tools.suckless.org/tabbed/patches/tabbed-0.6-clientnumber.diff
new file mode 100644
index 0000000..bbcff56
--- /dev/null
+++ b/tools.suckless.org/tabbed/patches/tabbed-0.6-clientnumber.diff
_AT_@ -0,0 +1,36 @@
+diff --git a/config.mk b/config.mk
+index 5279711..b0c212c 100644
+--- a/config.mk
++++ b/config.mk
+_AT_@ -12,7 +12,7 @@ INCS = -I. -I/usr/include
+ LIBS = -L/usr/lib -lc -lX11
+
+ # flags
+-CPPFLAGS = -DVERSION=\"${VERSION}\" -D_BSD_SOURCE
++CPPFLAGS = -DVERSION=\"${VERSION}\" -D_BSD_SOURCE -D_GNU_SOURCE
+ CFLAGS = -std=c99 -pedantic -Wall -O0 ${INCS} ${CPPFLAGS}
+ LDFLAGS = -s ${LIBS}
+
+diff --git a/tabbed.c b/tabbed.c
+index b2adf29..19b5bbb 100644
+--- a/tabbed.c
++++ b/tabbed.c
+_AT_@ -308,6 +308,7 @@ drawbar(void) {
+ unsigned long *col;
+ int c, fc, width, n = 0;
+ char *name = NULL;
++ char *tabtitle = NULL;
+
+ if(nclients == 0) {
+ dc.x = 0;
+_AT_@ -353,7 +354,9 @@ drawbar(void) {
+ } else {
+ col = dc.norm;
+ }
+- drawtext(clients[c]->name, col);
++ asprintf(&tabtitle, "%d: %s", c + 1, clients[c]->name);
++ drawtext(tabtitle, col);
++ free(tabtitle);
+ dc.x += dc.w;
+ clients[c]->tabx = dc.x;
+ }
Received on Fri Feb 07 2014 - 16:22:51 CET
This archive was generated by hypermail 2.3.0
: Thu Jun 18 2015 - 17:38:16 CEST