tabbed

[fork] xembed tabbing program
Log | Files | Refs | README | LICENSE

commit 2ce4c5c3b2e68cc62b46f8185ecafb5111a19a74
parent 3a82d3b933a34a3a7d40699c78523cc81830c2f7
Author: hhvn <dev@haydenvh.com>
Date:   Tue,  2 Mar 2021 14:13:21 +0000

tabbed.c: label each tab with number

Diffstat:
Mtabbed.c | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tabbed.c b/tabbed.c @@ -317,6 +317,7 @@ drawbar(void) XftColor *col; int c, cc, fc, width; char *name = NULL; + char tabtitle[256]; if (nclients == 0) { dc.x = 0; @@ -358,7 +359,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; }