tabbed-clientnumber-0.6.diff - sites - public wiki contents of suckless.org
 (HTM) git clone git://git.suckless.org/sites
 (DIR) Log
 (DIR) Files
 (DIR) Refs
       ---
       tabbed-clientnumber-0.6.diff (531B)
       ---
            1 diff --git a/tabbed.c b/tabbed.c
            2 index d30206b..70642cb 100644
            3 --- a/tabbed.c
            4 +++ b/tabbed.c
            5 @@ -308,6 +308,7 @@ drawbar(void) {
            6          unsigned long *col;
            7          int c, fc, width, n = 0;
            8          char *name = NULL;
            9 +        char tabtitle[256];
           10  
           11          if(nclients == 0) {
           12                  dc.x = 0;
           13 @@ -353,7 +354,9 @@ drawbar(void) {
           14                  } else {
           15                          col = 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          }