From bf4847d3e028516b0de446e8455d43833983c17b Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Tue, 23 Jul 2019 18:54:58 +0200 Subject: 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). --- terminal.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'terminal.h') 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 { -- cgit v1.3