~ft/bar

3d428dfe2787f0b01af280c59586bf9df99eadf5 — Sigrid Solveig Haflínudóttir 3 months ago a256cd7
use black text color if /dev/theme is unavailable
1 files changed, 6 insertions(+), 2 deletions(-)

M bar.c
M bar.c => bar.c +6 -2
@@ 312,8 312,12 @@ threadmain(int argc, char **argv)
		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;