config: add cursor-invert-fg-bg option

When set, the cursor-invert-fg-bg option uses the inverted foreground
and background colors of the cursor's current cell to color the cursor,
rather than using a fixed color. This option has higher precedence than
the cursor-color and cursor-text options, but has lower precedence than
an OSC 12 command to change the cursor color.
This commit is contained in:
Gregory Anders
2024-06-17 10:17:14 -05:00
parent 76e0cf1046
commit b09e4e5d63
4 changed files with 52 additions and 19 deletions

View File

@@ -289,6 +289,12 @@ palette: Palette = .{},
/// The color of the cursor. If this is not set, a default will be chosen.
@"cursor-color": ?Color = null,
/// Swap the foreground and background colors of the cell under the cursor. This
/// option overrides the `cursor-color` and `cursor-text` options.
///
/// This is currently only supported on macOS.
@"cursor-invert-fg-bg": bool = false,
/// The opacity level (opposite of transparency) of the cursor. A value of 1
/// is fully opaque and a value of 0 is fully transparent. A value less than 0
/// or greater than 1 will be clamped to the nearest valid value. Note that a