aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShivesh Mandalia <mail@shivesh.org>2021-09-22 17:41:51 +0100
committerShivesh Mandalia <mail@shivesh.org>2021-09-22 17:41:51 +0100
commitdd58e512e878669ac6d77d8bec5661f41d156884 (patch)
tree9804b37ae738d67d907d8533721bc9a754848dde
parent55f1c47e9ce807b9dff83a267cea1972154ce19c (diff)
downloadtabbed-dd58e512e878669ac6d77d8bec5661f41d156884.tar.gz
tabbed-dd58e512e878669ac6d77d8bec5661f41d156884.zip
Print the position number of the client before the window title
- Patch tabbed-clientnumber-20160702-bc23614.diff <https://tools.suckless.org/tabbed/patches/clientnumber/>
-rw-r--r--tabbed.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tabbed.c b/tabbed.c
index eafe28a..b81f269 100644
--- a/tabbed.c
+++ b/tabbed.c
@@ -326,6 +326,7 @@ drawbar(void)
XftColor *col;
int c, cc, fc, width;
char *name = NULL;
+ char tabtitle[256];
if (nclients == 0) {
dc.x = 0;
@@ -367,7 +368,9 @@ drawbar(void)
} else {
col = clients[c]->urgent ? dc.urg : dc.norm;
}
- drawtext(clients[c]->name, col);
+ snprintf(tabtitle, sizeof(tabtitle), "%d: %s",
+ c + 1, clients[c]->name);
+ drawtext(tabtitle, col);
dc.x += dc.w;
clients[c]->tabx = dc.x;
}