summaryrefslogtreecommitdiffstats
path: root/zellij-tile/src
diff options
context:
space:
mode:
authorLovecraftian Horror <LovecraftianHorror@pm.me>2021-07-09 15:21:47 -0400
committerLovecraftian Horror <LovecraftianHorror@pm.me>2021-07-09 15:21:47 -0400
commiteb6e49c260be568800e76fd3276fc96ad909d4eb (patch)
tree0a6bab35187891f5a61c11acfd54ffea340af6ec /zellij-tile/src
parent4fcf558156dec6cfebd9fc6ba8605594369fded6 (diff)
Move `ModeInfo::new()` back to `get_mode_info()`
Diffstat (limited to 'zellij-tile/src')
-rw-r--r--zellij-tile/src/data.rs43
1 files changed, 0 insertions, 43 deletions
diff --git a/zellij-tile/src/data.rs b/zellij-tile/src/data.rs
index 48ef4df9e..cdf57e69f 100644
--- a/zellij-tile/src/data.rs
+++ b/zellij-tile/src/data.rs
@@ -151,49 +151,6 @@ pub struct ModeInfo {
pub session_name: Option<String>,
}
-impl ModeInfo {
- /// Creates a [`ModeInfo`] struct indicating the current [`InputMode`] and its keybinds
- /// (as pairs of [`String`]s).
- pub fn new(mode: InputMode, palette: Palette, capabilities: PluginCapabilities) -> Self {
- let keybinds = match mode {
- InputMode::Normal | InputMode::Locked => Vec::new(),
- InputMode::Resize => vec![("←↓↑→".to_string(), "Resize".to_string())],
- InputMode::Pane => vec![
- ("←↓↑→".to_string(), "Move focus".to_string()),
- ("p".to_string(), "Next".to_string()),
- ("n".to_string(), "New".to_string()),
- ("d".to_string(), "Down split".to_string()),
- ("r".to_string(), "Right split".to_string()),
- ("x".to_string(), "Close".to_string()),
- ("f".to_string(), "Fullscreen".to_string()),
- ],
- InputMode::Tab => vec![
- ("←↓↑→".to_string(), "Move focus".to_string()),
- ("n".to_string(), "New".to_string()),
- ("x".to_string(), "Close".to_string()),
- ("r".to_string(), "Rename".to_string()),
- ("s".to_string(), "Sync".to_string()),
- ],
- InputMode::Scroll => vec![
- ("↓↑".to_string(), "Scroll".to_string()),
- ("PgUp/PgDn".to_string(), "Scroll Page".to_string()),
- ],
- InputMode::RenameTab => vec![("Enter".to_string(), "when done".to_string())],
- InputMode::Session => vec![("d".to_string(), "Detach".to_string())],
- };
-
- let session_name = std::env::var("ZELLIJ_SESSION_NAME").ok();
-
- Self {
- mode,
- keybinds,
- palette,
- capabilities,
- session_name,
- }
- }
-}
-
#[derive(Debug, Default, Clone, PartialEq, Eq, Hash, Deserialize, Serialize)]
pub struct TabInfo {
/* subset of fields to publish to plugins */