diff options
author | Aram Drevekenin <aram@poor.dev> | 2021-05-17 18:13:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-17 18:13:05 +0200 |
commit | a3f42b19a98c00b90fdd60a0486275a5f1829226 (patch) | |
tree | 1b57c80b8e6814851cf7c47fcf0bf9e5f00fadc6 /default-plugins/tab-bar | |
parent | 84911619b27fec7aa5d13f4d60db2e8625dc3a04 (diff) |
Osc implementation (#517)
* fix(compatibility): implement most osc methods
* style(fmt): rustfmt
* style(fmt): remove cargo warnings
* style(fmt): make clippy happy
* style(fmt): fix formatting after my clippy fixes broke it again ;P
* fix(grid): fix tests
Diffstat (limited to 'default-plugins/tab-bar')
-rw-r--r-- | default-plugins/tab-bar/src/line.rs | 12 | ||||
-rw-r--r-- | default-plugins/tab-bar/src/main.rs | 2 | ||||
-rw-r--r-- | default-plugins/tab-bar/src/tab.rs | 8 |
3 files changed, 12 insertions, 10 deletions
diff --git a/default-plugins/tab-bar/src/line.rs b/default-plugins/tab-bar/src/line.rs index 574edb78d..fce8982da 100644 --- a/default-plugins/tab-bar/src/line.rs +++ b/default-plugins/tab-bar/src/line.rs @@ -62,11 +62,11 @@ fn left_more_message(tab_count_to_the_left: usize, palette: Palette, separator: }; // 238 let more_text_len = more_text.chars().count() + 2; // 2 for the arrows - let left_separator = style!(palette.bg, palette.orange).paint(separator); + let left_separator = style!(palette.cyan, palette.orange).paint(separator); let more_styled_text = style!(palette.black, palette.orange) .bold() .paint(more_text); - let right_separator = style!(palette.orange, palette.bg).paint(separator); + let right_separator = style!(palette.orange, palette.cyan).paint(separator); let more_styled_text = format!( "{}", ANSIStrings(&[left_separator, more_styled_text, right_separator,]) @@ -94,11 +94,11 @@ fn right_more_message( " +many → ".to_string() }; let more_text_len = more_text.chars().count() + 1; // 2 for the arrow - let left_separator = style!(palette.bg, palette.orange).paint(separator); + let left_separator = style!(palette.cyan, palette.orange).paint(separator); let more_styled_text = style!(palette.black, palette.orange) .bold() .paint(more_text); - let right_separator = style!(palette.orange, palette.bg).paint(separator); + let right_separator = style!(palette.orange, palette.cyan).paint(separator); let more_styled_text = format!( "{}", ANSIStrings(&[left_separator, more_styled_text, right_separator,]) @@ -147,7 +147,9 @@ fn add_next_tabs_msg( fn tab_line_prefix(palette: Palette) -> LinePart { let prefix_text = " Zellij ".to_string(); let prefix_text_len = prefix_text.chars().count(); - let prefix_styled_text = style!(palette.white, palette.bg).bold().paint(prefix_text); + let prefix_styled_text = style!(palette.white, palette.cyan) + .bold() + .paint(prefix_text); LinePart { part: format!("{}", prefix_styled_text), len: prefix_text_len, diff --git a/default-plugins/tab-bar/src/main.rs b/default-plugins/tab-bar/src/main.rs index 00ff4bd96..46336be3d 100644 --- a/default-plugins/tab-bar/src/main.rs +++ b/default-plugins/tab-bar/src/main.rs @@ -75,7 +75,7 @@ impl ZellijPlugin for State { for bar_part in tab_line { s = format!("{}{}", s, bar_part.part); } - match self.mode_info.palette.bg { + match self.mode_info.palette.cyan { PaletteColor::Rgb((r, g, b)) => { println!("{}\u{1b}[48;2;{};{};{}m\u{1b}[0K", s, r, g, b); } diff --git a/default-plugins/tab-bar/src/tab.rs b/default-plugins/tab-bar/src/tab.rs index 85e2c378d..fb8e377d1 100644 --- a/default-plugins/tab-bar/src/tab.rs +++ b/default-plugins/tab-bar/src/tab.rs @@ -4,12 +4,12 @@ use zellij_tile::prelude::*; use zellij_tile_utils::style; pub fn active_tab(text: String, palette: Palette, separator: &str) -> LinePart { - let left_separator = style!(palette.bg, palette.green).paint(separator); + let left_separator = style!(palette.cyan, palette.green).paint(separator); let tab_text_len = text.chars().count() + 4; // 2 for left and right separators, 2 for the text padding let tab_styled_text = style!(palette.black, palette.green) .bold() .paint(format!(" {} ", text)); - let right_separator = style!(palette.green, palette.bg).paint(separator); + let right_separator = style!(palette.green, palette.cyan).paint(separator); let tab_styled_text = format!( "{}", ANSIStrings(&[left_separator, tab_styled_text, right_separator,]) @@ -21,12 +21,12 @@ pub fn active_tab(text: String, palette: Palette, separator: &str) -> LinePart { } pub fn non_active_tab(text: String, palette: Palette, separator: &str) -> LinePart { - let left_separator = style!(palette.bg, palette.fg).paint(separator); + let left_separator = style!(palette.cyan, palette.fg).paint(separator); let tab_text_len = text.chars().count() + 4; // 2 for left and right separators, 2 for the padding let tab_styled_text = style!(palette.black, palette.fg) .bold() .paint(format!(" {} ", text)); - let right_separator = style!(palette.fg, palette.bg).paint(separator); + let right_separator = style!(palette.fg, palette.cyan).paint(separator); let tab_styled_text = format!( "{}", ANSIStrings(&[left_separator, tab_styled_text, right_separator,]) |