aboutsummaryrefslogtreecommitdiffstats
path: root/default-plugins
diff options
context:
space:
mode:
authorKunal Mohan <kunalmohan99@gmail.com>2021-05-25 13:20:30 +0530
committerKunal Mohan <kunalmohan99@gmail.com>2021-05-25 13:20:30 +0530
commit151deb323578d599b9358db072b52ca712d950c6 (patch)
tree3fa7522c3045d59e5c88570b1125396086b2a5b1 /default-plugins
parentCHange keybind for Session mode and add comments for clarity (diff)
downloadsl0ppij-151deb323578d599b9358db072b52ca712d950c6.tar.gz
sl0ppij-151deb323578d599b9358db072b52ca712d950c6.tar.xz
sl0ppij-151deb323578d599b9358db072b52ca712d950c6.zip
remove shortened_text mode from status-bar
Diffstat (limited to 'default-plugins')
-rw-r--r--default-plugins/status-bar/src/first_line.rs46
1 files changed, 0 insertions, 46 deletions
diff --git a/default-plugins/status-bar/src/first_line.rs b/default-plugins/status-bar/src/first_line.rs
index a8bc19cd..7a678cdc 100644
--- a/default-plugins/status-bar/src/first_line.rs
+++ b/default-plugins/status-bar/src/first_line.rs
@@ -43,17 +43,6 @@ impl CtrlKeyShortcut {
CtrlKeyAction::Session => String::from("SESSION"),
}
}
- pub fn shortened_text(&self) -> String {
- match self.action {
- CtrlKeyAction::Lock => String::from("LOCK"),
- CtrlKeyAction::Pane => String::from("ane"),
- CtrlKeyAction::Tab => String::from("ab"),
- CtrlKeyAction::Resize => String::from("esize"),
- CtrlKeyAction::Scroll => String::from("croll"),
- CtrlKeyAction::Quit => String::from("uit"),
- CtrlKeyAction::Session => String::from("sess"),
- }
- }
pub fn letter_shortcut(&self) -> char {
match self.action {
CtrlKeyAction::Lock => 'g',
@@ -197,32 +186,6 @@ fn full_ctrl_key(key: &CtrlKeyShortcut, palette: ColoredElements, separator: &st
}
}
-fn shortened_ctrl_key(
- key: &CtrlKeyShortcut,
- palette: ColoredElements,
- separator: &str,
-) -> LinePart {
- let shortened_text = key.shortened_text();
- let letter_shortcut = key.letter_shortcut();
- let shortened_text = match key.action {
- CtrlKeyAction::Lock => format!(" {}", shortened_text),
- _ => shortened_text,
- };
- match key.mode {
- CtrlKeyMode::Unselected => {
- unselected_mode_shortcut(letter_shortcut, &shortened_text, palette, separator)
- }
- CtrlKeyMode::Selected => {
- selected_mode_shortcut(letter_shortcut, &shortened_text, palette, separator)
- }
- CtrlKeyMode::Disabled => disabled_mode_shortcut(
- &format!(" <{}>{}", letter_shortcut, shortened_text),
- palette,
- separator,
- ),
- }
-}
-
fn single_letter_ctrl_key(
key: &CtrlKeyShortcut,
palette: ColoredElements,
@@ -259,15 +222,6 @@ fn key_indicators(
}
line_part = LinePart::default();
for ctrl_key in keys {
- let key = shortened_ctrl_key(ctrl_key, palette, separator);
- line_part.part = format!("{}{}", line_part.part, key.part);
- line_part.len += key.len;
- }
- if line_part.len < max_len {
- return line_part;
- }
- line_part = LinePart::default();
- for ctrl_key in keys {
let key = single_letter_ctrl_key(ctrl_key, palette, separator);
line_part.part = format!("{}{}", line_part.part, key.part);
line_part.len += key.len;