tabbed

Mahdi's build of tabbed
git clone git://mahdi.pw/tabbed.git
Log | Files | Refs | README | LICENSE

tabbed-clientnumber-20160702-bc23614.diff (550B)


      1 diff --git a/tabbed.c b/tabbed.c
      2 index 9a44795..657909e 100644
      3 --- a/tabbed.c
      4 +++ b/tabbed.c
      5 @@ -318,6 +318,7 @@ drawbar(void)
      6  	XftColor *col;
      7  	int c, cc, fc, width;
      8  	char *name = NULL;
      9 +	char tabtitle[256];
     10  
     11  	if (nclients == 0) {
     12  		dc.x = 0;
     13 @@ -359,7 +360,9 @@ drawbar(void)
     14  		} else {
     15  			col = clients[c]->urgent ? dc.urg : dc.norm;
     16  		}
     17 -		drawtext(clients[c]->name, col);
     18 +		snprintf(tabtitle, sizeof(tabtitle), "%d: %s",
     19 +		         c + 1, clients[c]->name);
     20 +		drawtext(tabtitle, col);
     21  		dc.x += dc.w;
     22  		clients[c]->tabx = dc.x;
     23  	}