shithub: patch

ref: 368dd6ad29ac747ea16ec6b48617828912d7f3a0
dir: /bar-col/

View raw version
diff 46d9e65b6623956bc7b1f8d982dc986951cb4962 uncommitted
--- a/bar.c
+++ b/bar.c
@@ -241,7 +241,7 @@
 	uvlong t, oldt;
 	int oldbuttons;
 	char *s, *v[3];
-	u32int brgb;
+	u32int trgb;
 	Biobuf *b;
 	Rune key;
 	Mouse m;
@@ -286,12 +286,12 @@
 	if((local = tzload("local")) == nil)
 		sysfatal("zone: %r");
 
-	brgb = DPalegreygreen;
+	trgb = 0xff;
 	if((b = Bopen("/dev/theme", OREAD)) != nil){
 		while((s = Brdline(b, '\n')) != nil){
 			s[Blinelen(b)-1] = 0;
-			if(tokenize(s, v, nelem(v)) > 1 && strcmp(v[0], "ltitle") == 0){
-				brgb = strtoul(v[1], nil, 16)<<8 | 0xff;
+			if(tokenize(s, v, nelem(v)) > 1 && strcmp(v[0], "menutext") == 0){
+				trgb = strtoul(v[1], nil, 16)<<8 | 0xff;
 				break;
 			}
 		}
@@ -311,14 +311,8 @@
 	if((kctl = initkeyboard(nil)) == nil)
 		sysfatal("initkeyboard: %r");
 
-	cback = allocimage(display, Rect(0,0,1,1), RGB24, 1, brgb);
-	if(brgb == DPalegreygreen)
-		brgb = DBlack;
-	else{ /* dunno, just invert */
-		brgb = ~(brgb>>8 | brgb>>16 | brgb>>24);
-		brgb = brgb<<8 | brgb<<16 | brgb<<24 | 0xff;
-	}
-	ctext = allocimage(display, Rect(0,0,1,1), RGB24, 1, brgb);
+	cback = display->black;
+	ctext = allocimage(display, Rect(0,0,1,1), RGB24, 1, trgb);
 
 	a[Emouse].c = mctl->c;
 	a[Eresize].c = mctl->resizec;