diff --git a/src/common/input/handler.rs b/src/common/input/handler.rs index 163e5ddf..a843c7cc 100644 --- a/src/common/input/handler.rs +++ b/src/common/input/handler.rs @@ -256,7 +256,7 @@ impl InputHandler { // TODO this should probably be automatically generated in some way pub fn get_mode_info(mode: InputMode) -> ModeInfo { let mut keybinds: Vec<(String, String)> = vec![]; - let mut palette = load_palette(); + let palette = load_palette(); match mode { InputMode::Normal | InputMode::Locked => {} InputMode::Resize => { diff --git a/zellij-tile/src/data.rs b/zellij-tile/src/data.rs index 16f02531..c41a40ee 100644 --- a/zellij-tile/src/data.rs +++ b/zellij-tile/src/data.rs @@ -58,7 +58,16 @@ impl Default for InputMode { } } -#[derive(Clone, Copy, Default, Debug, Serialize, Deserialize)] +pub mod colors { + pub const WHITE: (u8, u8, u8) = (238, 238, 238); + pub const GREEN: (u8, u8, u8) = (175, 255, 0); + pub const GRAY: (u8, u8, u8) = (68, 68, 68); + pub const BRIGHT_GRAY: (u8, u8, u8) = (138, 138, 138); + pub const RED: (u8, u8, u8) = (135, 0, 0); + pub const BLACK: (u8, u8, u8) = (0, 0, 0); +} + +#[derive(Clone, Copy, Debug, Serialize, Deserialize)] pub struct Palette { pub fg: (u8, u8, u8), pub bg: (u8, u8, u8), @@ -72,6 +81,23 @@ pub struct Palette { pub white: (u8, u8, u8), } +impl Default for Palette { + fn default() -> Palette { + Palette { + fg: colors::BRIGHT_GRAY, + bg: colors::BLACK, + black: colors::BLACK, + red: colors::RED, + green: colors::GREEN, + yellow: colors::GRAY, + blue: colors::GRAY, + magenta: colors::GRAY, + cyan: colors::GRAY, + white: colors::WHITE, + } + } +} + /// Represents the contents of the help message that is printed in the status bar, /// which indicates the current [`InputMode`] and what the keybinds for that mode /// are. Related to the default `status-bar` plugin.