Archived
0
0
Fork 0
This repository has been archived on 2024-02-06. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/suckless/st/patch/invert.c
2021-12-27 21:04:49 -08:00

21 lines
375 B
C

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;
}