Browse Source

add colors to tabbar!

siduck76 4 years ago
parent
commit
fb430de33a
2 changed files with 27 additions and 23 deletions
  1. 21 19
      chadwm/config.def.h
  2. 6 4
      chadwm/dwm.c

+ 21 - 19
chadwm/config.def.h

@@ -32,29 +32,31 @@ static const char dmenufont[]       = "monospace:size=10";
 static const int colorfultag        = 1;  /* 0 means use SchemeSel for selected non vacant tag */
 
 
-static const char col_black[]       = "#2E3440";
-static const char col_gray2[]       = "#3B4252"; // unfocused window border
-static const char col_gray3[]       = "#606672";
-static const char col_gray4[]       = "#6d8dad";
-static const char col_blue[]       = "#81A1C1";  // focused window border
-static const char col_green[]        = "#89b482";
-static const char col_red[]         = "#BF616A";
-static const char col_orange[]       = "#caaa6a";
-static const char col_pink[] =       "#B48EAD";
+static const char black[]       = "#2E3440";
+static const char gray2[]       = "#3B4252"; // unfocused window border
+static const char gray3[]       = "#606672";
+static const char gray4[]       = "#6d8dad";
+static const char blue[]        = "#81A1C1";  // focused window border
+static const char green[]       = "#89b482";
+static const char red[]         = "#BF616A";
+static const char orange[]      = "#caaa6a";
+static const char pink[]        = "#B48EAD";
 static const char col_borderbar[]   = "#2E3440"; // inner border
+static const char purpleBlue[]  = "#6C77BB";
 
 static const char *colors[][3]      = {
     /*               fg         bg         border   */
-    [SchemeNorm] = { col_gray3, col_black, col_gray2 },
-    [SchemeSel]  = { col_gray4, col_blue,  col_blue  },
-
-    [SchemeTag]        = { col_gray3,    col_black,  col_black },
-    [SchemeTag1]       = { col_blue,      col_black,  col_black },
-    [SchemeTag2]       = { col_red,       col_black,  col_black },
-    [SchemeTag3]       = { col_orange,    col_black,  col_black },
-    [SchemeTag4]       = { col_green,     col_black,  col_black },
-    [SchemeTag5]       = { col_pink,     col_black,  col_black },
-    [SchemeLayout]     = { col_green,     col_black, col_black }, 
+    [SchemeNorm]       = { gray3, black, gray2 },
+    [SchemeSel]        = { gray4, blue,  blue  },
+    [TabSel]           = { black, purpleBlue,  black  },
+    [TabNorm]          = { gray3, black, black },
+    [SchemeTag]        = { gray3, black, black },
+    [SchemeTag1]       = { blue,  black, black },
+    [SchemeTag2]       = { red,   black, black },
+    [SchemeTag3]       = { orange, black,black },
+    [SchemeTag4]       = { green, black, black },
+    [SchemeTag5]       = { pink,  black, black },
+    [SchemeLayout]     = { green, black, black }, 
 };
 
 /* tagging */

+ 6 - 4
chadwm/dwm.c

@@ -95,7 +95,9 @@ enum {
   SchemeTag3,
   SchemeTag4,
   SchemeTag5,
-  SchemeLayout
+  SchemeLayout,
+  TabSel,
+  TabNorm,
 }; /* color schemes */
 enum {
   NetSupported,
@@ -554,7 +556,7 @@ void buttonpress(XEvent *e) {
       click = ClkStatusText;
     else
       click = ClkWinTitle;
-    	} // wut?
+    	} 
 	if(ev->window == selmon->tabwin) {
 		i = 0; x = 0;
 		for(c = selmon->clients; c; c = c->next){
@@ -1462,13 +1464,13 @@ drawtab(Monitor *m) {
 	  if(i >= m->ntabs) break;
 	  if(m->tab_widths[i] >  maxsize) m->tab_widths[i] = maxsize;
 	  w = m->tab_widths[i];
-	  drw_setscheme(drw, scheme[(c == m->sel) ? SchemeSel : SchemeNorm]);
+	  drw_setscheme(drw, scheme[(c == m->sel) ? TabSel : TabNorm]);
 	  drw_text(drw, x, 0, w, th, 0, c->name, 0);
 	  x += w;
 	  ++i;
 	}
 
-	drw_setscheme(drw, scheme[SchemeNorm]);
+	drw_setscheme(drw, scheme[TabNorm]);
 
 	/* cleans interspace between window names and current viewed tag label */
         w = mw - view_info_w - x;