use crate::terminal_bytes::TerminalBytes;
use crate::{
panes::PaneId,
plugins::PluginInstruction,
screen::ScreenInstruction,
thread_bus::{Bus, ThreadSenders},
ClientId, ServerInstruction,
};
use async_std::task::{self, JoinHandle};
use std::{collections::HashMap, env, os::unix::io::RawFd, path::PathBuf};
use zellij_utils::nix::unistd::Pid;
use zellij_utils::{
async_std,
errors::prelude::*,
errors::{ContextType, PtyContext},
input::{
command::{RunCommand, TerminalAction},
layout::{FloatingPaneLayout, Layout, Run, RunPluginLocation, TiledPaneLayout},
},
};
pub type VteBytes = Vec<u8>;
pub type TabIndex = u32;
#[derive(Clone, Copy, Debug)]
pub enum ClientOrTabIndex {
ClientId(ClientId),
TabIndex(usize),
}
/// Instructions related to PTYs (pseudoterminals).
#[derive(Clone, Debug)]
pub enum PtyInstruction {
SpawnTerminal(
Option<TerminalAction>,
Option<bool>,
Option<String>,
ClientOrTabIndex,
), // bool (if Some) is
// should_float, String is an optional pane name
OpenInPlaceEditor(PathBuf, Option<usize>, ClientId), // Option<usize> is the optional line number
SpawnTerminalVertically