shithub: bar

Download patch

ref: 3d428dfe2787f0b01af280c59586bf9df99eadf5
parent: a256cd75fe9d07308b20d17ebf3558d85557360c
parent:
author: Sigrid Solveig Haflínudóttir <ftrvxmtrx@gmail.com>
date: Thu Mar 11 04:39:44 EST 2021

use black text color if /dev/theme is unavailable

--- a/bar.c	Mon Feb 22 07:09:30 2021
+++ b/bar.c	Thu Mar 11 04:39:44 2021
@@ -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;