aboutsummaryrefslogtreecommitdiffstats
path: root/default-plugins/tab-bar
diff options
context:
space:
mode:
authorAram Drevekenin <aram@poor.dev>2021-11-25 16:21:59 +0100
committerGitHub <noreply@github.com>2021-11-25 16:21:59 +0100
commit6c6a4393f403359838ea9b32b09520de4f50c019 (patch)
treed1b553cab1a22c271be99bbc35a5e608bc96676d /default-plugins/tab-bar
parentadd: leave ephemeral modes by pressing `esc` (diff)
downloadsl0ppij-6c6a4393f403359838ea9b32b09520de4f50c019.tar.gz
sl0ppij-6c6a4393f403359838ea9b32b09520de4f50c019.tar.xz
sl0ppij-6c6a4393f403359838ea9b32b09520de4f50c019.zip
This adds a UI for multiple users in panes (behind a feature flag) (#897)
* feat(ui): multiple users in panes * style(fmt): make rustfmt happy * style(fmt): make clippy happy
Diffstat (limited to 'default-plugins/tab-bar')
-rw-r--r--default-plugins/tab-bar/src/line.rs12
-rw-r--r--default-plugins/tab-bar/src/main.rs2
-rw-r--r--default-plugins/tab-bar/src/tab.rs8
3 files changed, 11 insertions, 11 deletions
diff --git a/default-plugins/tab-bar/src/line.rs b/default-plugins/tab-bar/src/line.rs
index af78b0fc..2e180845 100644
--- a/default-plugins/tab-bar/src/line.rs
+++ b/default-plugins/tab-bar/src/line.rs
@@ -102,11 +102,11 @@ fn left_more_message(tab_count_to_the_left: usize, palette: Palette, separator:
// 238
// chars length plus separator length on both sides
let more_text_len = more_text.width() + 2 * separator.width();
- let left_separator = style!(palette.cyan, palette.orange).paint(separator);
+ let left_separator = style!(palette.gray, palette.orange).paint(separator);
let more_styled_text = style!(palette.black, palette.orange)
.bold()
.paint(more_text);
- let right_separator = style!(palette.orange, palette.cyan).paint(separator);
+ let right_separator = style!(palette.orange, palette.gray).paint(separator);
let more_styled_text = format!(
"{}",
ANSIStrings(&[left_separator, more_styled_text, right_separator,])
@@ -132,11 +132,11 @@ fn right_more_message(
};
// chars length plus separator length on both sides
let more_text_len = more_text.width() + 2 * separator.width();
- let left_separator = style!(palette.cyan, palette.orange).paint(separator);
+ let left_separator = style!(palette.gray, palette.orange).paint(separator);
let more_styled_text = style!(palette.black, palette.orange)
.bold()
.paint(more_text);
- let right_separator = style!(palette.orange, palette.cyan).paint(separator);
+ let right_separator = style!(palette.orange, palette.gray).paint(separator);
let more_styled_text = format!(
"{}",
ANSIStrings(&[left_separator, more_styled_text, right_separator,])
@@ -151,7 +151,7 @@ fn tab_line_prefix(session_name: Option<&str>, palette: Palette, cols: usize) ->
let prefix_text = " Zellij ".to_string();
let prefix_text_len = prefix_text.chars().count();
- let prefix_styled_text = style!(palette.white, palette.cyan)
+ let prefix_styled_text = style!(palette.white, palette.gray)
.bold()
.paint(prefix_text);
let mut parts = vec![LinePart {
@@ -161,7 +161,7 @@ fn tab_line_prefix(session_name: Option<&str>, palette: Palette, cols: usize) ->
if let Some(name) = session_name {
let name_part = format!("({}) ", name);
let name_part_len = name_part.width();
- let name_part_styled_text = style!(palette.white, palette.cyan).bold().paint(name_part);
+ let name_part_styled_text = style!(palette.white, palette.gray).bold().paint(name_part);
if cols.saturating_sub(prefix_text_len) >= name_part_len {
parts.push(LinePart {
part: format!("{}", name_part_styled_text),
diff --git a/default-plugins/tab-bar/src/main.rs b/default-plugins/tab-bar/src/main.rs
index 936c18e4..5902050a 100644
--- a/default-plugins/tab-bar/src/main.rs
+++ b/default-plugins/tab-bar/src/main.rs
@@ -112,7 +112,7 @@ impl ZellijPlugin for State {
}
len_cnt += bar_part.len;
}
- match self.mode_info.palette.cyan {
+ match self.mode_info.palette.gray {
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 fdb49855..fc34b6c3 100644
--- a/default-plugins/tab-bar/src/tab.rs
+++ b/default-plugins/tab-bar/src/tab.rs
@@ -5,12 +5,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.cyan, palette.green).paint(separator);
+ let left_separator = style!(palette.gray, palette.green).paint(separator);
let tab_text_len = text.width() + 2 + separator.width() * 2; // 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.cyan).paint(separator);
+ let right_separator = style!(palette.green, palette.gray).paint(separator);
let tab_styled_text = format!(
"{}",
ANSIStrings(&[left_separator, tab_styled_text, right_separator,])
@@ -22,12 +22,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.cyan, palette.fg).paint(separator);
+ let left_separator = style!(palette.gray, palette.fg).paint(separator);
let tab_text_len = text.width() + 2 + separator.width() * 2; // 2 for left and right separators, 2 for the text padding
let tab_styled_text = style!(palette.black, palette.fg)
.bold()
.paint(format!(" {} ", text));
- let right_separator = style!(palette.fg, palette.cyan).paint(separator);
+ let right_separator = style!(palette.fg, palette.gray).paint(separator);
let tab_styled_text = format!(
"{}",
ANSIStrings(&[left_separator, tab_styled_text, right_separator,])