diff options
| author | Kirill Chibisov <wchibisovkirill@gmail.com> | 2019-03-13 02:11:32 +0300 |
|---|---|---|
| committer | Christian Duerr <chrisduerr@users.noreply.github.com> | 2019-03-12 23:11:32 +0000 |
| commit | 0b9ae4ce936dfafbf5ea1929a170c97391cdea0b (patch) | |
| tree | fe4d17c51ab6a5bad60e7da8c0d24adbdce5a353 /src/config | |
| parent | 62c1d999e1361fc68ee4e54865b205415fa0a38d (diff) | |
| download | r-alacritty-0b9ae4ce936dfafbf5ea1929a170c97391cdea0b.tar.gz r-alacritty-0b9ae4ce936dfafbf5ea1929a170c97391cdea0b.tar.bz2 r-alacritty-0b9ae4ce936dfafbf5ea1929a170c97391cdea0b.zip | |
Add config option to change selection color
Diffstat (limited to 'src/config')
| -rw-r--r-- | src/config/mod.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/config/mod.rs b/src/config/mod.rs index 4b9e1f8e..b8dd9f82 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -1285,6 +1285,8 @@ pub struct Colors { pub primary: PrimaryColors, #[serde(deserialize_with = "failure_default")] pub cursor: CursorColors, + #[serde(deserialize_with = "failure_default")] + pub selection: SelectionColors, #[serde(deserialize_with = "deserialize_normal_colors")] pub normal: AnsiColors, #[serde(deserialize_with = "deserialize_bright_colors")] @@ -1300,6 +1302,7 @@ impl Default for Colors { Colors { primary: Default::default(), cursor: Default::default(), + selection: Default::default(), normal: default_normal_colors(), bright: default_bright_colors(), dim: Default::default(), @@ -1422,6 +1425,15 @@ pub struct CursorColors { } #[serde(default)] +#[derive(Debug, Copy, Clone, Default, Deserialize, PartialEq, Eq)] +pub struct SelectionColors { + #[serde(deserialize_with = "deserialize_optional_color")] + pub text: Option<Rgb>, + #[serde(deserialize_with = "deserialize_optional_color")] + pub background: Option<Rgb>, +} + +#[serde(default)] #[derive(Debug, Deserialize, PartialEq, Eq)] pub struct PrimaryColors { #[serde(deserialize_with = "rgb_from_hex")] |