~kris/suckless

st

ref: 180915a32d458ccf4191742cd6c27f20cdc46a65 st/patch/invert.c -rw-r--r-- 374 bytes
180915a3 — Kris Yotam Update README: clarify suckless repos are my builds 7 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
static int invertcolors = 0;

void
invert(const Arg *dummy)
{
	invertcolors = !invertcolors;
	redraw();
}

Color
invertedcolor(Color *clr)
{
	XRenderColor rc;
	Color inverted;
	rc.red = ~clr->color.red;
	rc.green = ~clr->color.green;
	rc.blue = ~clr->color.blue;
	rc.alpha = clr->color.alpha;
	XftColorAllocValue(xw.dpy, xw.vis, xw.cmap, &rc, &inverted);
	return inverted;
}