aboutsummaryrefslogtreecommitdiffstats
path: root/default-plugins/status-bar/src/second_line.rs
diff options
context:
space:
mode:
authorChristophe Verbinnen <christophe@verbinnen.org>2022-01-15 06:38:45 -0500
committerGitHub <noreply@github.com>2022-01-15 12:38:45 +0100
commit9cc2645db024df0a95efda42aed34bd3def19b28 (patch)
treed2345ca39dba0d5a2bf2cd7527799859147d6d69 /default-plugins/status-bar/src/second_line.rs
parentdocs(changelog): fix dependency problem (diff)
downloadsl0ppij-9cc2645db024df0a95efda42aed34bd3def19b28.tar.gz
sl0ppij-9cc2645db024df0a95efda42aed34bd3def19b28.tar.xz
sl0ppij-9cc2645db024df0a95efda42aed34bd3def19b28.zip
Add a copy command option (#996)
Usage: zellij options --copy-command "xclip -sel clip" Co-authored-by: Christophe Verbinnen <christophev@knowbe4.com>
Diffstat (limited to 'default-plugins/status-bar/src/second_line.rs')
-rw-r--r--default-plugins/status-bar/src/second_line.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/default-plugins/status-bar/src/second_line.rs b/default-plugins/status-bar/src/second_line.rs
index 6f3c6461..32a44425 100644
--- a/default-plugins/status-bar/src/second_line.rs
+++ b/default-plugins/status-bar/src/second_line.rs
@@ -241,6 +241,18 @@ pub fn text_copied_hint(palette: &Palette) -> LinePart {
}
}
+pub fn system_clipboard_error(palette: &Palette) -> LinePart {
+ let hint = " Error using the system clipboard.";
+ let red_color = match palette.red {
+ PaletteColor::Rgb((r, g, b)) => RGB(r, g, b),
+ PaletteColor::EightBit(color) => Fixed(color),
+ };
+ LinePart {
+ part: Style::new().fg(red_color).bold().paint(hint).to_string(),
+ len: hint.len(),
+ }
+}
+
pub fn fullscreen_panes_to_hide(palette: &Palette, panes_to_hide: usize) -> LinePart {
let white_color = match palette.white {
PaletteColor::Rgb((r, g, b)) => RGB(r, g, b),