term: prepare for configurable colors; add color variables to terminal

This commit is contained in:
Daniel Eklöf 2019-07-21 10:58:09 +02:00
parent b18478f9b6
commit 29d855d7c6
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
5 changed files with 19 additions and 10 deletions

2
osc.c
View file

@ -18,7 +18,7 @@ osc_query(struct terminal *term, unsigned param)
switch (param) {
case 10:
case 11: {
uint32_t color = param == 10 ? term->foreground : term->background;
uint32_t color = param == 10 ? term->colors.fg : term->colors.bg;
uint8_t r = (color >> 16) & 0xff;
uint8_t g = (color >> 8) & 0xff;
uint8_t b = (color >> 0) & 0xff;