shithub: bar

Download patch

ref: 3d428dfe2787f0b01af280c59586bf9df99eadf5
parent: a256cd75fe9d07308b20d17ebf3558d85557360c
author: Sigrid Solveig Haflínudóttir <[email protected]>
date: Thu Mar 11 04:39:44 EST 2021

use black text color if /dev/theme is unavailable

--- a/bar.c
+++ b/bar.c
@@ -312,8 +312,12 @@
 		sysfatal("initkeyboard: %r");
 
 	cback = allocimage(display, Rect(0,0,1,1), RGB24, 1, brgb);
-	brgb = ~(brgb>>8 | brgb>>16 | brgb>>24);
-	brgb = brgb<<8 | brgb<<16 | brgb<<24 | 0xff;
+	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);
 
 	a[Emouse].c = mctl->c;