summaryrefslogtreecommitdiffstats
path: root/default-plugins/status-bar/src/main.rs
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/status-bar/src/main.rs
parent9fb2c7ca168679905d79dcdaf686d40f4a6dc958 (diff)
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/status-bar/src/main.rs')
-rw-r--r--default-plugins/status-bar/src/main.rs64
1 files changed, 29 insertions, 35 deletions
diff --git a/default-plugins/status-bar/src/main.rs b/default-plugins/status-bar/src/main.rs
index f1b2197e4..1ecd87ab1 100644
--- a/default-plugins/status-bar/src/main.rs
+++ b/default-plugins/status-bar/src/main.rs
@@ -76,61 +76,55 @@ pub struct ColoredElements {
// that can be defined in the config perhaps
fn color_elements(palette: Palette) -> ColoredElements {
match palette.source {
- // "cyan" here is used as a background as a dirty hack
- // this is because the Palette struct doesn't have a "gray" section
- // and we can't use its "bg" because that is now dynamically taken from the terminal
- // and might often not actually fit the rest of the colorscheme
- //
- // to fix this, we need to restructure the Palette struct
PaletteSource::Default => ColoredElements {
- selected_prefix_separator: style!(palette.cyan, palette.green),
+ selected_prefix_separator: style!(palette.gray, palette.green),
selected_char_left_separator: style!(palette.black, palette.green).bold(),
selected_char_shortcut: style!(palette.red, palette.green).bold(),
selected_char_right_separator: style!(palette.black, palette.green).bold(),
selected_styled_text: style!(palette.black, palette.green).bold(),
- selected_suffix_separator: style!(palette.green, palette.cyan).bold(),
- unselected_prefix_separator: style!(palette.cyan, palette.fg),
+ selected_suffix_separator: style!(palette.green, palette.gray).bold(),
+ unselected_prefix_separator: style!(palette.gray, palette.fg),
unselected_char_left_separator: style!(palette.black, palette.fg).bold(),
unselected_char_shortcut: style!(palette.red, palette.fg).bold(),
unselected_char_right_separator: style!(palette.black, palette.fg).bold(),
unselected_styled_text: style!(palette.black, palette.fg).bold(),
- unselected_suffix_separator: style!(palette.fg, palette.cyan),
- disabled_prefix_separator: style!(palette.cyan, palette.fg),
- disabled_styled_text: style!(palette.cyan, palette.fg).dimmed(),
- disabled_suffix_separator: style!(palette.fg, palette.cyan),
- selected_single_letter_prefix_separator: style!(palette.cyan, palette.green),
+ unselected_suffix_separator: style!(palette.fg, palette.gray),
+ disabled_prefix_separator: style!(palette.gray, palette.fg),
+ disabled_styled_text: style!(palette.gray, palette.fg).dimmed(),
+ disabled_suffix_separator: style!(palette.fg, palette.gray),
+ selected_single_letter_prefix_separator: style!(palette.gray, palette.green),
selected_single_letter_char_shortcut: style!(palette.red, palette.green).bold(),
- selected_single_letter_suffix_separator: style!(palette.green, palette.cyan),
- unselected_single_letter_prefix_separator: style!(palette.cyan, palette.fg),
+ selected_single_letter_suffix_separator: style!(palette.green, palette.gray),
+ unselected_single_letter_prefix_separator: style!(palette.gray, palette.fg),
unselected_single_letter_char_shortcut: style!(palette.red, palette.fg).bold(),
- unselected_single_letter_suffix_separator: style!(palette.fg, palette.cyan),
- superkey_prefix: style!(palette.white, palette.cyan).bold(),
- superkey_suffix_separator: style!(palette.cyan, palette.cyan),
+ unselected_single_letter_suffix_separator: style!(palette.fg, palette.gray),
+ superkey_prefix: style!(palette.white, palette.gray).bold(),
+ superkey_suffix_separator: style!(palette.gray, palette.gray),
},
PaletteSource::Xresources => ColoredElements {
- selected_prefix_separator: style!(palette.cyan, palette.green),
+ selected_prefix_separator: style!(palette.gray, palette.green),
selected_char_left_separator: style!(palette.fg, palette.green).bold(),
selected_char_shortcut: style!(palette.red, palette.green).bold(),
selected_char_right_separator: style!(palette.fg, palette.green).bold(),
- selected_styled_text: style!(palette.cyan, palette.green).bold(),
- selected_suffix_separator: style!(palette.green, palette.cyan).bold(),
- unselected_prefix_separator: style!(palette.cyan, palette.fg),
- unselected_char_left_separator: style!(palette.cyan, palette.fg).bold(),
+ selected_styled_text: style!(palette.gray, palette.green).bold(),
+ selected_suffix_separator: style!(palette.green, palette.gray).bold(),
+ unselected_prefix_separator: style!(palette.gray, palette.fg),
+ unselected_char_left_separator: style!(palette.gray, palette.fg).bold(),
unselected_char_shortcut: style!(palette.red, palette.fg).bold(),
- unselected_char_right_separator: style!(palette.cyan, palette.fg).bold(),
- unselected_styled_text: style!(palette.cyan, palette.fg).bold(),
- unselected_suffix_separator: style!(palette.fg, palette.cyan),
- disabled_prefix_separator: style!(palette.cyan, palette.fg),
- disabled_styled_text: style!(palette.cyan, palette.fg).dimmed(),
- disabled_suffix_separator: style!(palette.fg, palette.cyan),
+ unselected_char_right_separator: style!(palette.gray, palette.fg).bold(),
+ unselected_styled_text: style!(palette.gray, palette.fg).bold(),
+ unselected_suffix_separator: style!(palette.fg, palette.gray),
+ disabled_prefix_separator: style!(palette.gray, palette.fg),
+ disabled_styled_text: style!(palette.gray, palette.fg).dimmed(),
+ disabled_suffix_separator: style!(palette.fg, palette.gray),
selected_single_letter_prefix_separator: style!(palette.fg, palette.green),
selected_single_letter_char_shortcut: style!(palette.red, palette.green).bold(),
selected_single_letter_suffix_separator: style!(palette.green, palette.fg),
- unselected_single_letter_prefix_separator: style!(palette.fg, palette.cyan),
+ unselected_single_letter_prefix_separator: style!(palette.fg, palette.gray),
unselected_single_letter_char_shortcut: style!(palette.red, palette.fg).bold(),
- unselected_single_letter_suffix_separator: style!(palette.fg, palette.cyan),
- superkey_prefix: style!(palette.cyan, palette.fg).bold(),
- superkey_suffix_separator: style!(palette.fg, palette.cyan),
+ unselected_single_letter_suffix_separator: style!(palette.fg, palette.gray),
+ superkey_prefix: style!(palette.gray, palette.fg).bold(),
+ superkey_suffix_separator: style!(palette.fg, palette.gray),
},
}
}
@@ -231,7 +225,7 @@ impl ZellijPlugin for State {
// [48;5;238m is gray background, [0K is so that it fills the rest of the line
// [m is background reset, [0K is so that it clears the rest of the line
- 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", first_line, r, g, b);
}