diff --git a/src/colorscheme.rs b/src/colorscheme.rs index ee3a222..24273b9 100644 --- a/src/colorscheme.rs +++ b/src/colorscheme.rs @@ -3,6 +3,7 @@ use std::path::Path; use std::str::FromStr; use serde::Deserialize; +use tui::style::{Color, Style}; pub enum Colorschemes { Default, @@ -29,33 +30,98 @@ impl FromStr for Colorschemes { } #[derive(Deserialize)] -pub struct Colorscheme { - fg: i64, - bg: i64, +pub struct ColorschemeRaw { + pub fg: i64, + pub bg: i64, - titles: i64, - borders: i64, + pub titles: i64, + pub borders: i64, - battery_lines: Vec, + pub battery_lines: Vec, // need at least 8 entries - cpu_lines: Vec, + pub cpu_lines: Vec, - mem_main: i64, - mem_swap: i64, + pub mem_main: i64, + pub mem_swap: i64, - net_bars: i64, + pub net_bars: i64, - proc_cursor: i64, + pub proc_cursor: i64, - temp_low: i64, - temp_high: i64, + pub temp_low: i64, + pub temp_high: i64, } -pub fn read_colorscheme( +pub struct Colorscheme { + pub text: Style, + + pub titles: Style, + pub borders: Style, + + pub battery_lines: Vec