mirror of
https://github.com/wez/wezterm.git
synced 2024-12-23 13:21:38 +03:00
wezterm: make the split color configurable and darker
This makes the color of the split divider darker by default, and configurable via the color scheme configuration file. refs: #297
This commit is contained in:
parent
eb9f7aefc6
commit
1978eba0a1
@ -26,6 +26,8 @@ pub struct Palette {
|
||||
/// The color of the "thumb" of the scrollbar; the segment that
|
||||
/// represents the current viewable area
|
||||
pub scrollbar_thumb: Option<RgbColor>,
|
||||
/// The color of the split line between panes
|
||||
pub split: Option<RgbColor>,
|
||||
}
|
||||
impl_lua_conversion!(Palette);
|
||||
|
||||
@ -47,6 +49,7 @@ impl From<Palette> for wezterm_term::color::ColorPalette {
|
||||
apply_color!(selection_fg);
|
||||
apply_color!(selection_bg);
|
||||
apply_color!(scrollbar_thumb);
|
||||
apply_color!(split);
|
||||
|
||||
if let Some(ansi) = cfg.ansi {
|
||||
for (idx, col) in ansi.iter().enumerate() {
|
||||
|
@ -47,6 +47,9 @@ return {
|
||||
-- The color of the scrollbar "thumb"; the portion that represents the current viewport
|
||||
scrollbar_thumb = "#222222",
|
||||
|
||||
-- The color of the split lines between panes
|
||||
split = "#444444",
|
||||
|
||||
ansi = {"black", "maroon", "green", "olive", "navy", "purple", "teal", "silver"},
|
||||
brights = {"grey", "red", "lime", "yellow", "blue", "fuchsia", "aqua", "white"},
|
||||
}
|
||||
|
@ -28,6 +28,7 @@ pub struct ColorPalette {
|
||||
pub selection_fg: RgbColor,
|
||||
pub selection_bg: RgbColor,
|
||||
pub scrollbar_thumb: RgbColor,
|
||||
pub split: RgbColor,
|
||||
}
|
||||
|
||||
/// Adjust the color to make it appear disabled.
|
||||
@ -88,6 +89,7 @@ impl ColorPalette {
|
||||
selection_fg: grey_out(self.selection_fg),
|
||||
selection_bg: grey_out(self.selection_bg),
|
||||
scrollbar_thumb: grey_out(self.scrollbar_thumb),
|
||||
split: grey_out(self.split),
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -232,6 +234,7 @@ impl Default for ColorPalette {
|
||||
let selection_bg = RgbColor::new(0xff, 0xfa, 0xcd);
|
||||
|
||||
let scrollbar_thumb = RgbColor::new(0x22, 0x22, 0x22);
|
||||
let split = RgbColor::new(0x44, 0x44, 0x44);
|
||||
|
||||
ColorPalette {
|
||||
colors: Palette256(colors),
|
||||
@ -243,6 +246,7 @@ impl Default for ColorPalette {
|
||||
selection_fg,
|
||||
selection_bg,
|
||||
scrollbar_thumb,
|
||||
split,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2255,7 +2255,7 @@ impl TermWindow {
|
||||
"─"
|
||||
};
|
||||
let palette = pane.palette();
|
||||
let foreground = rgbcolor_to_window_color(palette.foreground);
|
||||
let foreground = rgbcolor_to_window_color(palette.split);
|
||||
let background = rgbcolor_alpha_to_window_color(
|
||||
palette.background,
|
||||
if self.window_background.is_none() && config.window_background_opacity == 1.0 {
|
||||
|
Loading…
Reference in New Issue
Block a user