aboutsummaryrefslogtreecommitdiffstats
path: root/default-plugins/sequence/src/state/layout.rs
diff options
context:
space:
mode:
authorAram Drevekenin <aram@poor.dev>2026-02-17 15:43:28 +0100
committerGitHub <noreply@github.com>2026-02-17 15:43:28 +0100
commit4e66a0beff5e41bda1dbde521fa1d2858c46fe7b (patch)
tree380bee5eeac56bea2ebf341cccbe69615585e394 /default-plugins/sequence/src/state/layout.rs
parentFix startup message and cache file creation (#4705) (diff)
downloadsl0ppij-4e66a0beff5e41bda1dbde521fa1d2858c46fe7b.tar.gz
sl0ppij-4e66a0beff5e41bda1dbde521fa1d2858c46fe7b.tar.xz
sl0ppij-4e66a0beff5e41bda1dbde521fa1d2858c46fe7b.zip
Revamp the sequence plugin (#4713)
* initial pipe interface * initial open_x_pane_in_new_tab plugin api implementation * fix: send CommandPaneExited for command panes opened as initial_terminals in new tabs from plugins * open panes in place of specific pane id plugin commands - initial implementation * sequence and plugin api ux * focus self when starting * combine ui and pipe paths * highlight selected pane * initial sequence removal of editing capabilities * fix: translate plugin paths in api * properly trim commands when loaded from pipe or pasted text * minor ux fixes * get ctrl c to work properly * behavior fixes * more ui fixes * fix tests * close tab and end sequence properly * default to AND * zellij sequence alias * add alias * consolidate paths * rustfmt * fix ui padding * add pr * fix: reset scrolling when resetting terminal state
Diffstat (limited to 'default-plugins/sequence/src/state/layout.rs')
-rw-r--r--default-plugins/sequence/src/state/layout.rs54
1 files changed, 0 insertions, 54 deletions
diff --git a/default-plugins/sequence/src/state/layout.rs b/default-plugins/sequence/src/state/layout.rs
index 65a267e0..6b070778 100644
--- a/default-plugins/sequence/src/state/layout.rs
+++ b/default-plugins/sequence/src/state/layout.rs
@@ -1,10 +1,4 @@
-use crate::state::positioning;
-use std::path::PathBuf;
-use zellij_tile::prelude::*;
-
pub struct Layout {
- pub needs_reposition: bool,
- pub cached_cursor_position: Option<(usize, usize)>,
pub spinner_frame: usize,
pub spinner_timer_scheduled: bool,
}
@@ -12,58 +6,10 @@ pub struct Layout {
impl Layout {
pub fn new() -> Self {
Self {
- needs_reposition: false,
- cached_cursor_position: None,
spinner_frame: 0,
spinner_timer_scheduled: false,
}
}
-
- pub fn reposition_plugin_based_on_sequence_state(
- &mut self,
- is_running: bool,
- first_command_pane_id: Option<PaneId>,
- pane_manifest: &PaneManifest,
- plugin_id: Option<u32>,
- total_viewport_columns: Option<usize>,
- total_viewport_rows: Option<usize>,
- total_commands: usize,
- _selected_index: Option<usize>,
- _running_index: usize,
- _cwd: &Option<PathBuf>,
- ) {
- let Some(plugin_id) = plugin_id else {
- return;
- };
- let (Some(total_cols), Some(total_rows)) = (total_viewport_columns, total_viewport_rows)
- else {
- return;
- };
-
- if !self.needs_reposition || !is_running {
- return;
- }
-
- let Some(first_pane_id) = first_command_pane_id else {
- return;
- };
-
- for (_tab_index, panes) in &pane_manifest.panes {
- for pane in panes {
- if !pane.is_plugin && PaneId::Terminal(pane.id) == first_pane_id {
- positioning::reposition_plugin_for_sequence(
- plugin_id,
- total_cols,
- total_rows,
- total_commands,
- );
-
- self.needs_reposition = false;
- return;
- }
- }
- }
- }
}
impl Default for Layout {