1 --- dwm/dwm.c 2019-10-23 22:00:05.157679567 +0300
2 +++ /mnt/data/dev/suckless/dwm-6.2/dwm.c 2019-10-23 19:34:18.724418081 +0300
6 enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */
7 -enum { SchemeNorm, SchemeSel }; /* color schemes */
8 +enum { SchemeNorm, SchemeSel, SchemeWarn, SchemeUrgent,
9 +SchemeCol5,SchemeCol6,SchemeCol7,SchemeCol8,SchemeCol9,
10 +SchemeCol10,SchemeCol11,SchemeCol12,SchemeCol13
11 +}; /* color schemes */
12 enum { NetSupported, NetWMName, NetWMState, NetWMCheck,
13 NetWMFullscreen, NetActiveWindow, NetWMWindowType,
14 NetWMWindowTypeDialog, NetClientList, NetLast }; /* EWMH atoms */
16 int boxs = drw->fonts->h / 9;
17 int boxw = drw->fonts->h / 6 + 2;
18 unsigned int i, occ = 0, urg = 0;
25 + /* correction for colours */
27 + char *xcape = malloc (sizeof (char) * 128);
28 + memset(xcape,0,sizeof (char) * 128);
29 + for ( ; *ts != '\0' ; ts++) {
30 + if (*ts <= LENGTH(colors)) {
31 + sprintf(xcape,"%c",*ts);
32 + correct += TEXTW(xcape) - lrpad;
38 /* draw status first so it can be overdrawn by tags later */
39 if (m == selmon) { /* status is only drawn on selected monitor */
40 drw_setscheme(drw, scheme[SchemeNorm]);
41 - sw = TEXTW(stext) - lrpad + 2; /* 2px right padding */
42 - drw_text(drw, m->ww - sw, 0, sw, bh, 0, stext, 0);
43 + sw = TEXTW(stext) - lrpad + 2 - correct; /* 2px right padding */
45 + if ((unsigned int)*ts > LENGTH(colors)) {ts++; continue ;}
49 + drw_text(drw, m->ww - sw + tx, 0, sw - tx, bh, 0, tp, 0);
50 + tx += TEXTW(tp) - lrpad;
51 + if (ctmp == '\0') { break; }
52 + drw_setscheme(drw, scheme[(unsigned int)(ctmp-1)]);
58 for (c = m->clients; c; c = c->next) {