Adding invert patch

This commit is contained in:
bakkeby 2020-03-29 15:38:16 +02:00
parent 4966f31256
commit d26b46ffa7
8 changed files with 62 additions and 0 deletions

21
patch/invert.c Normal file
View file

@ -0,0 +1,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;
}