Alexandre Pasmantier 67677fb917
refactor!: all channels are now cable channels (#479)
- tv's default channel (when lauching `tv`) is now configurable via the
`default_channel` configuration option
- add `RUST_BACKTRACE=1` and `--nocapture` to ci testing for better
debugging
- remove all builtin channels and associated glue code as well as the
`ToCliChannel` and `ToUnitChannel` derive macros
- recode all builtin channels using shell commands (along with `fd`,
`bat`, and `rg`)
- add support for interactive shell commands inside cable channels
- drop the `send_to_channel` feature until further notice (will be
reimplemented later on in a more generic and customizable way)
2025-04-27 23:50:14 +02:00

55 lines
1.4 KiB
Rust

use ratatui::style::Color;
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct Colorscheme {
pub general: GeneralColorscheme,
pub help: HelpColorscheme,
pub results: ResultsColorscheme,
pub preview: PreviewColorscheme,
pub input: InputColorscheme,
pub mode: ModeColorscheme,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct GeneralColorscheme {
pub border_fg: Color,
pub background: Option<Color>,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct HelpColorscheme {
pub metadata_field_name_fg: Color,
pub metadata_field_value_fg: Color,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Default)]
pub struct ResultsColorscheme {
pub result_name_fg: Color,
pub result_preview_fg: Color,
pub result_line_number_fg: Color,
pub result_selected_bg: Color,
pub result_selected_fg: Color,
pub match_foreground_color: Color,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct PreviewColorscheme {
pub title_fg: Color,
pub highlight_bg: Color,
pub content_fg: Color,
pub gutter_fg: Color,
pub gutter_selected_fg: Color,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct InputColorscheme {
pub input_fg: Color,
pub results_count_fg: Color,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct ModeColorscheme {
pub channel: Color,
pub remote_control: Color,
}