Alexandre Pasmantier 913aa85af0
feat(themes): add support for ui themes (#114)
fixes #80 

### examples
| gruvbox | solarized |
| :-: | :-: |
| <img width="1792" alt="gruvbox"
src="https://github.com/user-attachments/assets/c0c168a5-5c95-4113-93fd-24b34a9344d8"
/> | ![Screenshot 2024-12-13 at 14 38
57](https://github.com/user-attachments/assets/368e3e37-7fdd-493a-8c0b-47e3731ae67b)
|
2024-12-13 14:54:38 +01:00

21 lines
557 B
Rust

use ratatui::style::Color;
use serde::{Deserialize, Serialize};
use crate::colors::ModeColorscheme;
pub fn mode_color(mode: Mode, colorscheme: &ModeColorscheme) -> Color {
match mode {
Mode::Channel => colorscheme.channel,
Mode::RemoteControl => colorscheme.remote_control,
Mode::SendToChannel => colorscheme.send_to_channel,
}
}
// FIXME: Mode shouldn't be in the screen crate
#[derive(PartialEq, Copy, Clone, Hash, Eq, Debug, Serialize, Deserialize)]
pub enum Mode {
Channel,
RemoteControl,
SendToChannel,
}