dwm-showselmon-6.2.diff - sites - public wiki contents of suckless.org
 (HTM) git clone git://git.suckless.org/sites
 (DIR) Log
 (DIR) Files
 (DIR) Refs
       ---
       dwm-showselmon-6.2.diff (1935B)
       ---
            1 diff -up a/config.def.h b/config.def.h
            2 --- a/config.def.h        2020-07-04 13:56:23.316739958 +0200
            3 +++ b/config.def.h        2020-07-04 13:57:58.020554340 +0200
            4 @@ -15,6 +15,7 @@ static const char col_cyan[]        = "#
            5  static const char *colors[][3]      = {
            6          /*               fg         bg         border   */
            7          [SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
            8 +        [SchemeInv]  = { col_gray1, col_gray3, col_gray2 },
            9          [SchemeSel]  = { col_gray4, col_cyan,  col_cyan  },
           10  };
           11  
           12 diff -up a/dwm.c b/dwm.c
           13 --- a/dwm.c        2020-07-04 13:56:23.316739958 +0200
           14 +++ b/dwm.c        2020-07-04 14:14:54.124590755 +0200
           15 @@ -59,7 +59,7 @@
           16  
           17  /* enums */
           18  enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */
           19 -enum { SchemeNorm, SchemeSel }; /* color schemes */
           20 +enum { SchemeNorm, SchemeInv, SchemeSel }; /* color schemes */
           21  enum { NetSupported, NetWMName, NetWMState, NetWMCheck,
           22         NetWMFullscreen, NetActiveWindow, NetWMWindowType,
           23         NetWMWindowTypeDialog, NetClientList, NetLast }; /* EWMH atoms */
           24 @@ -716,7 +716,12 @@ drawbar(Monitor *m)
           25          x = 0;
           26          for (i = 0; i < LENGTH(tags); i++) {
           27                  w = TEXTW(tags[i]);
           28 -                drw_setscheme(drw, scheme[m->tagset[m->seltags] & 1 << i ? SchemeSel : SchemeNorm]);
           29 +                if (m == selmon) {
           30 +                        drw_setscheme(drw, scheme[m->tagset[m->seltags] & 1 << i ? SchemeSel : SchemeNorm]);
           31 +                }
           32 +                else {
           33 +                        drw_setscheme(drw, scheme[m->tagset[m->seltags] & 1 << i ? SchemeInv : SchemeNorm]);
           34 +                }
           35                  drw_text(drw, x, 0, w, bh, lrpad / 2, tags[i], urg & 1 << i);
           36                  if (occ & 1 << i)
           37                          drw_rect(drw, x + boxs, boxs, boxw, boxw,
           38 @@ -730,7 +735,7 @@ drawbar(Monitor *m)
           39  
           40          if ((w = m->ww - sw - x) > bh) {
           41                  if (m->sel) {
           42 -                        drw_setscheme(drw, scheme[m == selmon ? SchemeSel : SchemeNorm]);
           43 +                        drw_setscheme(drw, scheme[m == selmon ? SchemeSel : SchemeInv]);
           44                          drw_text(drw, x, 0, w, bh, lrpad / 2, m->sel->name, 0);
           45                          if (m->sel->isfloating)
           46                                  drw_rect(drw, x + boxs, boxs, boxw, boxw, m->sel->isfixed, 0);