aboutsummaryrefslogtreecommitdiff
path: root/terminal.h
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-07-23 16:54:58 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-07-23 16:54:58 +0000
commitbf4847d3e028516b0de446e8455d43833983c17b (patch)
tree0b3dfa5627bffec22e87db85928aef7c6a59c14e /terminal.h
parentcsi: ignore CSI ?1036h/l (metaSendsEscape) (diff)
conf: allow the user to configure a fixed cursor color
The default is to reverse the foreground/background colors in the cell with the cursor. But, if the user configures a specific set of cursor colors, those will always be used, regardless of other cell attributes (dim, reverse etc). The cursor color is specified as two color values, 'text' and 'cursor'. The block cursor uses the 'cursor' color as background, and the 'text' color for the glyph. All other cursor styles uses the 'cursor' color for the cursor, but uses the cell's foreground color for the glyph (meaning, dim/reverse/etc applies).
Diffstat (limited to 'terminal.h')
-rw-r--r--terminal.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/terminal.h b/terminal.h
index 94e99215..49a24803 100644
--- a/terminal.h
+++ b/terminal.h
@@ -296,6 +296,14 @@ struct terminal {
enum cursor_style default_cursor_style;
enum cursor_style cursor_style;
bool cursor_blinking;
+ struct {
+ uint32_t text;
+ uint32_t cursor;
+ } default_cursor_color;
+ struct {
+ uint32_t text;
+ uint32_t cursor;
+ } cursor_color;
uint32_t input_serial;
struct {