Add support for OSC color sequences
Ref. - https://git.suckless.org/st/commit/8e310303903792c010d03c046ba75f8b18f7d3a7.html - https://git.suckless.org/st/commit/273db5ceaf392e68c2faf8f7dec14ea2e25e980d.html
This commit is contained in:
parent
7099c6ec73
commit
9ab02993c3
3 changed files with 76 additions and 19 deletions
13
x.c
13
x.c
|
|
@ -934,6 +934,19 @@ xloadcols(void)
|
|||
}
|
||||
#endif // ALPHA_FOCUS_HIGHLIGHT_PATCH
|
||||
|
||||
int
|
||||
xgetcolor(int x, unsigned char *r, unsigned char *g, unsigned char *b)
|
||||
{
|
||||
if (!BETWEEN(x, 0, dc.collen))
|
||||
return 1;
|
||||
|
||||
*r = dc.col[x].color.red >> 8;
|
||||
*g = dc.col[x].color.green >> 8;
|
||||
*b = dc.col[x].color.blue >> 8;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
xsetcolorname(int x, const char *name)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue