use crossterm::style::Color;
#[derive(Debug, Clone)]
pub struct Theme {
pub primary: Color,
pub secondary: Color,
pub background: Color,
pub foreground: Color,
pub muted: Color,
pub error: Color,
pub success: Color,
pub warning: Color,
pub border: Color,
pub border_focused: Color,
pub button_bg: Color,
pub button_fg: Color,
pub button_focused_bg: Color,
pub button_focused_fg: Color,
pub selection_bg: Color,
pub selection_fg: Color,
pub input_bg: Color,
pub input_fg: Color,
pub placeholder: Color,
pub cursor: Color,
pub cursor_text: Color,
}
impl Default for Theme {
fn default() -> Self {
Self::dark()
}
}
impl Theme {
pub fn dark() -> Self {
Self {
primary: Color::Cyan,
secondary: Color::Magenta,
background: Color::Reset,
foreground: Color::Reset,
muted: Color::DarkGrey,
error: Color::Red,
success: Color::Green,
warning: Color::Yellow,
border: Color::Reset,
border_focused: Color::Cyan,
button_bg: Color::Reset,
button_fg: Color::Grey,
button_focused_bg: Color::White,
button_focused_fg: Color::Black,
selection_bg: Color::Grey, selection_fg: Color::Black,
input_bg: Color::Reset,
input_fg: Color::Reset,
placeholder: Color::DarkGrey,
cursor: Color::Black,
cursor_text: Color::Grey,
}
}
pub fn light() -> Self {
Self {
primary: Color::Blue,
secondary: Color::Magenta,
background: Color::White,
foreground: Color::Black,
muted: Color::DarkGrey,
error: Color::Red,
success: Color::Green,
warning: Color::Yellow,
border: Color::DarkGrey,
border_focused: Color::Blue,
button_bg: Color::DarkGrey,
button_fg: Color::White,
button_focused_bg: Color::Blue,
button_focused_fg: Color::White,
selection_bg: Color::Blue,
selection_fg: Color::White,
input_bg: Color::White,
input_fg: Color::Black,
placeholder: Color::DarkGrey,
cursor: Color::Black,
cursor_text: Color::White,
}
}
pub fn nord() -> Self {
Self {
primary: Color::Rgb {
r: 136,
g: 192,
b: 208,
}, secondary: Color::Rgb {
r: 180,
g: 142,
b: 173,
}, background: Color::Rgb {
r: 46,
g: 52,
b: 64,
}, foreground: Color::Rgb {
r: 236,
g: 239,
b: 244,
}, muted: Color::Rgb {
r: 76,
g: 86,
b: 106,
}, error: Color::Rgb {
r: 191,
g: 97,
b: 106,
}, success: Color::Rgb {
r: 163,
g: 190,
b: 140,
}, warning: Color::Rgb {
r: 235,
g: 203,
b: 139,
}, border: Color::Rgb {
r: 76,
g: 86,
b: 106,
}, border_focused: Color::Rgb {
r: 136,
g: 192,
b: 208,
}, button_bg: Color::Rgb {
r: 59,
g: 66,
b: 82,
}, button_fg: Color::Rgb {
r: 236,
g: 239,
b: 244,
}, button_focused_bg: Color::Rgb {
r: 136,
g: 192,
b: 208,
}, button_focused_fg: Color::Rgb {
r: 46,
g: 52,
b: 64,
}, selection_bg: Color::Rgb {
r: 136,
g: 192,
b: 208,
}, selection_fg: Color::Rgb {
r: 46,
g: 52,
b: 64,
}, input_bg: Color::Rgb {
r: 59,
g: 66,
b: 82,
}, input_fg: Color::Rgb {
r: 236,
g: 239,
b: 244,
}, placeholder: Color::Rgb {
r: 76,
g: 86,
b: 106,
}, cursor: Color::Rgb {
r: 236,
g: 239,
b: 244,
}, cursor_text: Color::Rgb {
r: 46,
g: 52,
b: 64,
}, }
}
pub fn monokai() -> Self {
Self {
primary: Color::Rgb {
r: 102,
g: 217,
b: 239,
}, secondary: Color::Rgb {
r: 174,
g: 129,
b: 255,
}, background: Color::Rgb {
r: 39,
g: 40,
b: 34,
}, foreground: Color::Rgb {
r: 248,
g: 248,
b: 242,
}, muted: Color::Rgb {
r: 117,
g: 113,
b: 94,
}, error: Color::Rgb {
r: 249,
g: 38,
b: 114,
}, success: Color::Rgb {
r: 166,
g: 226,
b: 46,
}, warning: Color::Rgb {
r: 253,
g: 151,
b: 31,
}, border: Color::Rgb {
r: 117,
g: 113,
b: 94,
},
border_focused: Color::Rgb {
r: 102,
g: 217,
b: 239,
},
button_bg: Color::Rgb {
r: 73,
g: 72,
b: 62,
},
button_fg: Color::Rgb {
r: 248,
g: 248,
b: 242,
},
button_focused_bg: Color::Rgb {
r: 102,
g: 217,
b: 239,
},
button_focused_fg: Color::Rgb {
r: 39,
g: 40,
b: 34,
},
selection_bg: Color::Rgb {
r: 102,
g: 217,
b: 239,
},
selection_fg: Color::Rgb {
r: 39,
g: 40,
b: 34,
},
input_bg: Color::Rgb {
r: 73,
g: 72,
b: 62,
},
input_fg: Color::Rgb {
r: 248,
g: 248,
b: 242,
},
placeholder: Color::Rgb {
r: 117,
g: 113,
b: 94,
},
cursor: Color::Rgb {
r: 248,
g: 248,
b: 242,
}, cursor_text: Color::Rgb {
r: 39,
g: 40,
b: 34,
}, }
}
pub fn catppuccin_mocha() -> Self {
Self {
primary: Color::Rgb {
r: 137,
g: 180,
b: 250,
}, secondary: Color::Rgb {
r: 203,
g: 166,
b: 247,
}, background: Color::Rgb {
r: 30,
g: 30,
b: 46,
}, foreground: Color::Rgb {
r: 205,
g: 214,
b: 244,
}, muted: Color::Rgb {
r: 108,
g: 112,
b: 134,
}, error: Color::Rgb {
r: 243,
g: 139,
b: 168,
}, success: Color::Rgb {
r: 166,
g: 227,
b: 161,
}, warning: Color::Rgb {
r: 249,
g: 226,
b: 175,
}, border: Color::Rgb {
r: 69,
g: 71,
b: 90,
}, border_focused: Color::Rgb {
r: 137,
g: 180,
b: 250,
}, button_bg: Color::Rgb {
r: 49,
g: 50,
b: 68,
}, button_fg: Color::Rgb {
r: 205,
g: 214,
b: 244,
}, button_focused_bg: Color::Rgb {
r: 137,
g: 180,
b: 250,
}, button_focused_fg: Color::Rgb {
r: 30,
g: 30,
b: 46,
}, selection_bg: Color::Rgb {
r: 137,
g: 180,
b: 250,
}, selection_fg: Color::Rgb {
r: 30,
g: 30,
b: 46,
}, input_bg: Color::Rgb {
r: 49,
g: 50,
b: 68,
}, input_fg: Color::Rgb {
r: 205,
g: 214,
b: 244,
}, placeholder: Color::Rgb {
r: 108,
g: 112,
b: 134,
}, cursor: Color::Rgb {
r: 205,
g: 214,
b: 244,
}, cursor_text: Color::Rgb {
r: 30,
g: 30,
b: 46,
}, }
}
pub fn catppuccin_latte() -> Self {
Self {
primary: Color::Rgb {
r: 30,
g: 102,
b: 245,
}, secondary: Color::Rgb {
r: 136,
g: 57,
b: 239,
}, background: Color::Rgb {
r: 239,
g: 241,
b: 245,
}, foreground: Color::Rgb {
r: 76,
g: 79,
b: 105,
}, muted: Color::Rgb {
r: 156,
g: 160,
b: 176,
}, error: Color::Rgb {
r: 210,
g: 15,
b: 57,
}, success: Color::Rgb {
r: 64,
g: 160,
b: 43,
}, warning: Color::Rgb {
r: 223,
g: 142,
b: 29,
}, border: Color::Rgb {
r: 188,
g: 192,
b: 204,
}, border_focused: Color::Rgb {
r: 30,
g: 102,
b: 245,
}, button_bg: Color::Rgb {
r: 204,
g: 208,
b: 218,
}, button_fg: Color::Rgb {
r: 76,
g: 79,
b: 105,
}, button_focused_bg: Color::Rgb {
r: 30,
g: 102,
b: 245,
}, button_focused_fg: Color::Rgb {
r: 239,
g: 241,
b: 245,
}, selection_bg: Color::Rgb {
r: 30,
g: 102,
b: 245,
}, selection_fg: Color::Rgb {
r: 239,
g: 241,
b: 245,
}, input_bg: Color::Rgb {
r: 204,
g: 208,
b: 218,
}, input_fg: Color::Rgb {
r: 76,
g: 79,
b: 105,
}, placeholder: Color::Rgb {
r: 156,
g: 160,
b: 176,
}, cursor: Color::Rgb {
r: 76,
g: 79,
b: 105,
}, cursor_text: Color::Rgb {
r: 239,
g: 241,
b: 245,
}, }
}
pub fn dracula() -> Self {
Self {
primary: Color::Rgb {
r: 139,
g: 233,
b: 253,
}, secondary: Color::Rgb {
r: 189,
g: 147,
b: 249,
}, background: Color::Rgb {
r: 40,
g: 42,
b: 54,
}, foreground: Color::Rgb {
r: 248,
g: 248,
b: 242,
}, muted: Color::Rgb {
r: 98,
g: 114,
b: 164,
}, error: Color::Rgb {
r: 255,
g: 85,
b: 85,
}, success: Color::Rgb {
r: 80,
g: 250,
b: 123,
}, warning: Color::Rgb {
r: 255,
g: 184,
b: 108,
}, border: Color::Rgb {
r: 68,
g: 71,
b: 90,
}, border_focused: Color::Rgb {
r: 139,
g: 233,
b: 253,
}, button_bg: Color::Rgb {
r: 68,
g: 71,
b: 90,
}, button_fg: Color::Rgb {
r: 248,
g: 248,
b: 242,
}, button_focused_bg: Color::Rgb {
r: 139,
g: 233,
b: 253,
}, button_focused_fg: Color::Rgb {
r: 40,
g: 42,
b: 54,
}, selection_bg: Color::Rgb {
r: 68,
g: 71,
b: 90,
}, selection_fg: Color::Rgb {
r: 248,
g: 248,
b: 242,
}, input_bg: Color::Rgb {
r: 68,
g: 71,
b: 90,
}, input_fg: Color::Rgb {
r: 248,
g: 248,
b: 242,
}, placeholder: Color::Rgb {
r: 98,
g: 114,
b: 164,
}, cursor: Color::Rgb {
r: 248,
g: 248,
b: 242,
}, cursor_text: Color::Rgb {
r: 40,
g: 42,
b: 54,
}, }
}
pub fn gruvbox_dark() -> Self {
Self {
primary: Color::Rgb {
r: 131,
g: 165,
b: 152,
}, secondary: Color::Rgb {
r: 211,
g: 134,
b: 155,
}, background: Color::Rgb {
r: 40,
g: 40,
b: 40,
}, foreground: Color::Rgb {
r: 235,
g: 219,
b: 178,
}, muted: Color::Rgb {
r: 146,
g: 131,
b: 116,
}, error: Color::Rgb {
r: 251,
g: 73,
b: 52,
}, success: Color::Rgb {
r: 184,
g: 187,
b: 38,
}, warning: Color::Rgb {
r: 250,
g: 189,
b: 47,
}, border: Color::Rgb {
r: 80,
g: 73,
b: 69,
}, border_focused: Color::Rgb {
r: 131,
g: 165,
b: 152,
}, button_bg: Color::Rgb {
r: 60,
g: 56,
b: 54,
}, button_fg: Color::Rgb {
r: 235,
g: 219,
b: 178,
}, button_focused_bg: Color::Rgb {
r: 131,
g: 165,
b: 152,
}, button_focused_fg: Color::Rgb {
r: 40,
g: 40,
b: 40,
}, selection_bg: Color::Rgb {
r: 131,
g: 165,
b: 152,
}, selection_fg: Color::Rgb {
r: 40,
g: 40,
b: 40,
}, input_bg: Color::Rgb {
r: 60,
g: 56,
b: 54,
}, input_fg: Color::Rgb {
r: 235,
g: 219,
b: 178,
}, placeholder: Color::Rgb {
r: 146,
g: 131,
b: 116,
}, cursor: Color::Rgb {
r: 235,
g: 219,
b: 178,
}, cursor_text: Color::Rgb {
r: 40,
g: 40,
b: 40,
}, }
}
pub fn solarized_dark() -> Self {
Self {
primary: Color::Rgb {
r: 38,
g: 139,
b: 210,
}, secondary: Color::Rgb {
r: 108,
g: 113,
b: 196,
}, background: Color::Rgb { r: 0, g: 43, b: 54 }, foreground: Color::Rgb {
r: 131,
g: 148,
b: 150,
}, muted: Color::Rgb {
r: 88,
g: 110,
b: 117,
}, error: Color::Rgb {
r: 220,
g: 50,
b: 47,
}, success: Color::Rgb {
r: 133,
g: 153,
b: 0,
}, warning: Color::Rgb {
r: 181,
g: 137,
b: 0,
}, border: Color::Rgb { r: 7, g: 54, b: 66 }, border_focused: Color::Rgb {
r: 38,
g: 139,
b: 210,
}, button_bg: Color::Rgb { r: 7, g: 54, b: 66 }, button_fg: Color::Rgb {
r: 131,
g: 148,
b: 150,
}, button_focused_bg: Color::Rgb {
r: 38,
g: 139,
b: 210,
}, button_focused_fg: Color::Rgb {
r: 253,
g: 246,
b: 227,
}, selection_bg: Color::Rgb {
r: 38,
g: 139,
b: 210,
}, selection_fg: Color::Rgb {
r: 253,
g: 246,
b: 227,
}, input_bg: Color::Rgb { r: 7, g: 54, b: 66 }, input_fg: Color::Rgb {
r: 131,
g: 148,
b: 150,
}, placeholder: Color::Rgb {
r: 88,
g: 110,
b: 117,
}, cursor: Color::Rgb {
r: 131,
g: 148,
b: 150,
}, cursor_text: Color::Rgb {
r: 0,
g: 43,
b: 54,
}, }
}
pub fn rose_pine() -> Self {
Self {
primary: Color::Rgb {
r: 156,
g: 207,
b: 216,
}, secondary: Color::Rgb {
r: 196,
g: 167,
b: 231,
}, background: Color::Rgb {
r: 25,
g: 23,
b: 36,
}, foreground: Color::Rgb {
r: 224,
g: 222,
b: 244,
}, muted: Color::Rgb {
r: 110,
g: 106,
b: 134,
}, error: Color::Rgb {
r: 235,
g: 111,
b: 146,
}, success: Color::Rgb {
r: 49,
g: 116,
b: 143,
}, warning: Color::Rgb {
r: 246,
g: 193,
b: 119,
}, border: Color::Rgb {
r: 31,
g: 29,
b: 46,
}, border_focused: Color::Rgb {
r: 156,
g: 207,
b: 216,
}, button_bg: Color::Rgb {
r: 31,
g: 29,
b: 46,
}, button_fg: Color::Rgb {
r: 224,
g: 222,
b: 244,
}, button_focused_bg: Color::Rgb {
r: 156,
g: 207,
b: 216,
}, button_focused_fg: Color::Rgb {
r: 25,
g: 23,
b: 36,
}, selection_bg: Color::Rgb {
r: 156,
g: 207,
b: 216,
}, selection_fg: Color::Rgb {
r: 25,
g: 23,
b: 36,
}, input_bg: Color::Rgb {
r: 31,
g: 29,
b: 46,
}, input_fg: Color::Rgb {
r: 224,
g: 222,
b: 244,
}, placeholder: Color::Rgb {
r: 110,
g: 106,
b: 134,
}, cursor: Color::Rgb {
r: 224,
g: 222,
b: 244,
}, cursor_text: Color::Rgb {
r: 25,
g: 23,
b: 36,
}, }
}
pub fn hax0r_blue() -> Self {
Self {
primary: Color::Rgb {
r: 16,
g: 182,
b: 255,
}, secondary: Color::Rgb {
r: 0,
g: 179,
b: 247,
}, background: Color::Rgb { r: 1, g: 5, b: 21 }, foreground: Color::Rgb {
r: 17,
g: 183,
b: 255,
}, muted: Color::Rgb {
r: 72,
g: 65,
b: 87,
}, error: Color::Rgb {
r: 16,
g: 182,
b: 255,
}, success: Color::Rgb {
r: 16,
g: 182,
b: 255,
}, warning: Color::Rgb {
r: 16,
g: 182,
b: 255,
}, border: Color::Rgb {
r: 16,
g: 182,
b: 255,
}, border_focused: Color::Rgb {
r: 250,
g: 250,
b: 250,
}, button_bg: Color::Rgb { r: 1, g: 9, b: 33 }, button_fg: Color::Rgb {
r: 16,
g: 182,
b: 255,
}, button_focused_bg: Color::Rgb {
r: 16,
g: 182,
b: 255,
}, button_focused_fg: Color::Rgb { r: 1, g: 5, b: 21 }, selection_bg: Color::Rgb {
r: 193,
g: 228,
b: 255,
}, selection_fg: Color::Rgb { r: 1, g: 5, b: 21 }, input_bg: Color::Rgb { r: 1, g: 9, b: 33 }, input_fg: Color::Rgb {
r: 16,
g: 182,
b: 255,
}, placeholder: Color::Rgb {
r: 72,
g: 65,
b: 87,
}, cursor: Color::Rgb {
r: 17,
g: 183,
b: 255,
}, cursor_text: Color::Rgb { r: 1, g: 5, b: 21 }, }
}
pub fn hax0r_green() -> Self {
Self {
primary: Color::Rgb {
r: 21,
g: 208,
b: 13,
}, secondary: Color::Rgb {
r: 25,
g: 226,
b: 14,
}, background: Color::Rgb { r: 2, g: 15, b: 1 }, foreground: Color::Rgb {
r: 22,
g: 177,
b: 14,
}, muted: Color::Rgb {
r: 51,
g: 72,
b: 67,
}, error: Color::Rgb {
r: 21,
g: 208,
b: 13,
}, success: Color::Rgb {
r: 21,
g: 208,
b: 13,
}, warning: Color::Rgb {
r: 21,
g: 208,
b: 13,
}, border: Color::Rgb {
r: 21,
g: 208,
b: 13,
}, border_focused: Color::Rgb {
r: 250,
g: 250,
b: 250,
}, button_bg: Color::Rgb { r: 0, g: 31, b: 11 }, button_fg: Color::Rgb {
r: 21,
g: 208,
b: 13,
}, button_focused_bg: Color::Rgb {
r: 21,
g: 208,
b: 13,
}, button_focused_fg: Color::Rgb { r: 2, g: 15, b: 1 }, selection_bg: Color::Rgb {
r: 212,
g: 255,
b: 193,
}, selection_fg: Color::Rgb { r: 2, g: 15, b: 1 }, input_bg: Color::Rgb { r: 0, g: 31, b: 11 }, input_fg: Color::Rgb {
r: 21,
g: 208,
b: 13,
}, placeholder: Color::Rgb {
r: 51,
g: 72,
b: 67,
}, cursor: Color::Rgb {
r: 22,
g: 177,
b: 14,
}, cursor_text: Color::Rgb { r: 2, g: 15, b: 1 }, }
}
pub fn hax0r_red() -> Self {
Self {
primary: Color::Rgb {
r: 176,
g: 13,
b: 13,
}, secondary: Color::Rgb {
r: 255,
g: 17,
b: 17,
}, background: Color::Rgb { r: 32, g: 1, b: 1 }, foreground: Color::Rgb {
r: 177,
g: 14,
b: 14,
}, muted: Color::Rgb {
r: 85,
g: 64,
b: 64,
}, error: Color::Rgb {
r: 255,
g: 17,
b: 17,
}, success: Color::Rgb {
r: 176,
g: 13,
b: 13,
}, warning: Color::Rgb {
r: 176,
g: 13,
b: 13,
}, border: Color::Rgb {
r: 176,
g: 13,
b: 13,
}, border_focused: Color::Rgb {
r: 250,
g: 250,
b: 250,
}, button_bg: Color::Rgb { r: 31, g: 0, b: 0 }, button_fg: Color::Rgb {
r: 176,
g: 13,
b: 13,
}, button_focused_bg: Color::Rgb {
r: 176,
g: 13,
b: 13,
}, button_focused_fg: Color::Rgb { r: 32, g: 1, b: 1 }, selection_bg: Color::Rgb {
r: 235,
g: 193,
b: 255,
}, selection_fg: Color::Rgb { r: 32, g: 1, b: 1 }, input_bg: Color::Rgb { r: 31, g: 0, b: 0 }, input_fg: Color::Rgb {
r: 176,
g: 13,
b: 13,
}, placeholder: Color::Rgb {
r: 85,
g: 64,
b: 64,
}, cursor: Color::Rgb {
r: 177,
g: 14,
b: 14,
}, cursor_text: Color::Rgb { r: 32, g: 1, b: 1 }, }
}
pub fn tokyo_night() -> Self {
Self {
primary: Color::Rgb {
r: 122,
g: 162,
b: 247,
}, secondary: Color::Rgb {
r: 187,
g: 154,
b: 247,
}, background: Color::Rgb {
r: 26,
g: 27,
b: 38,
}, foreground: Color::Rgb {
r: 192,
g: 202,
b: 245,
}, muted: Color::Rgb {
r: 65,
g: 72,
b: 104,
}, error: Color::Rgb {
r: 247,
g: 118,
b: 142,
}, success: Color::Rgb {
r: 158,
g: 206,
b: 106,
}, warning: Color::Rgb {
r: 224,
g: 175,
b: 104,
}, border: Color::Rgb {
r: 41,
g: 46,
b: 66,
}, border_focused: Color::Rgb {
r: 122,
g: 162,
b: 247,
}, button_bg: Color::Rgb {
r: 41,
g: 46,
b: 66,
}, button_fg: Color::Rgb {
r: 192,
g: 202,
b: 245,
}, button_focused_bg: Color::Rgb {
r: 122,
g: 162,
b: 247,
}, button_focused_fg: Color::Rgb {
r: 26,
g: 27,
b: 38,
}, selection_bg: Color::Rgb {
r: 122,
g: 162,
b: 247,
}, selection_fg: Color::Rgb {
r: 26,
g: 27,
b: 38,
}, input_bg: Color::Rgb {
r: 41,
g: 46,
b: 66,
}, input_fg: Color::Rgb {
r: 192,
g: 202,
b: 245,
}, placeholder: Color::Rgb {
r: 65,
g: 72,
b: 104,
}, cursor: Color::Rgb {
r: 192,
g: 202,
b: 245,
}, cursor_text: Color::Rgb {
r: 26,
g: 27,
b: 38,
}, }
}
pub fn with_primary(mut self, color: Color) -> Self {
self.primary = color;
self
}
pub fn with_secondary(mut self, color: Color) -> Self {
self.secondary = color;
self
}
pub fn with_background(mut self, color: Color) -> Self {
self.background = color;
self
}
pub fn with_foreground(mut self, color: Color) -> Self {
self.foreground = color;
self
}
pub fn with_error(mut self, color: Color) -> Self {
self.error = color;
self
}
pub fn with_success(mut self, color: Color) -> Self {
self.success = color;
self
}
pub fn with_warning(mut self, color: Color) -> Self {
self.warning = color;
self
}
}
use std::cell::RefCell;
thread_local! {
static CURRENT_THEME: RefCell<Theme> = RefCell::new(Theme::default());
}
pub fn set_theme(theme: Theme) {
CURRENT_THEME.with(|t| {
*t.borrow_mut() = theme;
});
}
pub fn current_theme() -> Theme {
CURRENT_THEME.with(|t| t.borrow().clone())
}
pub fn themed_color<F>(f: F) -> Color
where
F: FnOnce(&Theme) -> Color,
{
CURRENT_THEME.with(|t| f(&t.borrow()))
}
pub fn supports_true_color() -> bool {
use std::env;
if let Ok(term_program) = env::var("TERM_PROGRAM") {
if term_program == "Apple_Terminal" {
return false;
}
}
if let Ok(colorterm) = env::var("COLORTERM") {
if colorterm == "truecolor" || colorterm == "24bit" {
return true;
}
}
if let Ok(term) = env::var("TERM") {
if term.contains("256color") || term.contains("truecolor") || term.contains("24bit") {
}
}
if let Ok(term_program) = env::var("TERM_PROGRAM") {
let true_color_terminals = [
"iTerm.app",
"Hyper",
"vscode",
"Ghostty",
"WezTerm",
"Alacritty",
"kitty",
];
if true_color_terminals
.iter()
.any(|t| term_program.contains(t))
{
return true;
}
}
true
}
pub fn terminal_name() -> Option<String> {
std::env::var("TERM_PROGRAM").ok()
}