diff options
author | denis <denismaximov98@gmail.com> | 2021-03-26 16:42:38 +0200 |
---|---|---|
committer | denis <denismaximov98@gmail.com> | 2021-03-26 16:42:38 +0200 |
commit | 2c402b0b1d6a21220dca65835335bacfe3fe43e6 (patch) | |
tree | e1efc26e167e049f17f45d9b8a78193ee691d280 /zellij-tile | |
parent | a35cade8dea3c6dff822c7fb04a439777433721a (diff) |
wip: scary how messy it is, but it's a start
Diffstat (limited to 'zellij-tile')
-rw-r--r-- | zellij-tile/src/shim.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/zellij-tile/src/shim.rs b/zellij-tile/src/shim.rs index b7beb7afe..bad9ffa80 100644 --- a/zellij-tile/src/shim.rs +++ b/zellij-tile/src/shim.rs @@ -28,6 +28,7 @@ pub enum Key { pub struct Help { pub mode: InputMode, pub keybinds: Vec<(String, String)>, + pub palette: Palette } // TODO: use same struct from main crate? @@ -51,6 +52,20 @@ pub struct TabData { pub active: bool, } +#[derive(Default, Debug, Copy, Clone, Deserialize, Serialize)] +pub struct Palette { + pub fg: (u8, u8, u8), + pub bg: (u8, u8, u8), + pub black: (u8, u8, u8), + pub red: (u8, u8, u8), + pub green: (u8, u8, u8), + pub yellow: (u8, u8, u8), + pub blue: (u8, u8, u8), + pub magenta: (u8, u8, u8), + pub cyan: (u8, u8, u8), + pub white: (u8, u8, u8), +} + impl Default for InputMode { fn default() -> InputMode { InputMode::Normal @@ -60,6 +75,9 @@ impl Default for InputMode { pub fn get_key() -> Key { deserialize_from_stdin().unwrap() } +pub fn get_palette() -> Palette { + deserialize_from_stdin().unwrap() +} pub fn open_file(path: &Path) { println!("{}", path.to_string_lossy()); |