diff options
author | Jake Merdich <jake@merdich.com> | 2017-06-23 10:01:53 -0700 |
---|---|---|
committer | Joe Wilm <jwilm@users.noreply.github.com> | 2017-06-23 11:27:15 -0700 |
commit | b4a839aee9784a2d281be1bec87ac6f2ae4a79f0 (patch) | |
tree | 19a72d9a8a80c472a5cc4bf431e769695b01a02c /src/config.rs | |
parent | 0091d3cb99e69ffc946ab6bbf40530ff8694b246 (diff) | |
download | alacritty-b4a839aee9784a2d281be1bec87ac6f2ae4a79f0.tar.gz alacritty-b4a839aee9784a2d281be1bec87ac6f2ae4a79f0.zip |
Add dim color support
Add support for the VTE 'dim' flag, with additional support for
custom-themed dim colors. If no color is specified in the config, it
will default to 2/3 the previous (not a spec, but the value other
terminals seem to use).
The actual dimming behavior brings bright colors to normal and regular
colors to the new dim ones. Custom RGB values are not changed, nor are
non-named indexed colors.
Diffstat (limited to 'src/config.rs')
-rw-r--r-- | src/config.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/config.rs b/src/config.rs index 5142b9b0..7734e7af 100644 --- a/src/config.rs +++ b/src/config.rs @@ -741,6 +741,7 @@ pub struct Colors { pub cursor: CursorColors, pub normal: AnsiColors, pub bright: AnsiColors, + pub dim: Option<AnsiColors>, } fn deserialize_cursor_colors<D>(deserializer: D) -> ::std::result::Result<CursorColors, D::Error> @@ -838,12 +839,13 @@ impl Default for Colors { magenta: Rgb {r: 0xb7, g: 0x7e, b: 0xe0}, cyan: Rgb {r: 0x54, g: 0xce, b: 0xd6}, white: Rgb {r: 0xff, g: 0xff, b: 0xff}, - } + }, + dim: None, } } } -/// The normal or bright colors section of config +/// The 8-colors sections of config #[derive(Debug, Deserialize)] pub struct AnsiColors { #[serde(deserialize_with = "rgb_from_hex")] |