diff options
| author | Aram Drevekenin <aram@poor.dev> | 2023-08-24 13:36:24 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-24 13:36:24 +0200 |
| commit | bc628abc1266cdc0dbce4f19a89727527a3e39a8 (patch) | |
| tree | 6a0fcac6ec35c71a237bca0128a57a5b40afb0e3 /zellij-utils/src/ipc.rs | |
| parent | docs(changelog): permission system (diff) | |
| download | sl0ppij-bc628abc1266cdc0dbce4f19a89727527a3e39a8.tar.gz sl0ppij-bc628abc1266cdc0dbce4f19a89727527a3e39a8.tar.xz sl0ppij-bc628abc1266cdc0dbce4f19a89727527a3e39a8.zip | |
feat(sessions): add a session manager to switch between sessions, tabs and panes and create new ones (#2721)
* write/read session metadata to disk for all sessions
* switch session client side
* fix tests
* various adjustments
* fix full screen focus bug in tiled panes
* fix tests
* fix permission sorting issue
* cleanups
* add session manager
* fix tests
* various cleanups
* style(fmt): rustfmt
* clear screen before switching sessions
* I hate you clippy
* truncate controls line to width
* version session cache
* attempt to fix plugin tests
* style(fmt): rustfmt
* another attempt to fix the tests in the ci
Diffstat (limited to 'zellij-utils/src/ipc.rs')
| -rw-r--r-- | zellij-utils/src/ipc.rs | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/zellij-utils/src/ipc.rs b/zellij-utils/src/ipc.rs index 149a157a..0f341520 100644 --- a/zellij-utils/src/ipc.rs +++ b/zellij-utils/src/ipc.rs @@ -1,7 +1,7 @@ //! IPC stuff for starting to split things into a client and server model. use crate::{ cli::CliArgs, - data::{ClientId, InputMode, Style}, + data::{ClientId, ConnectToSession, InputMode, Style}, errors::{get_current_ctx, prelude::*, ErrorContext}, input::keybinds::Keybinds, input::{actions::Action, layout::Layout, options::Options, plugins::PluginsConfig}, @@ -65,16 +65,6 @@ impl PixelDimensions { #[allow(clippy::large_enum_variant)] #[derive(Serialize, Deserialize, Debug, Clone)] pub enum ClientToServerMsg { - /*// List which sessions are available - ListSessions, - // Create a new session - CreateSession, - // Attach to a running session - AttachToSession(SessionId, ClientType), - // Force detach - DetachSession(SessionId), - // Disconnect from the session we're connected to - DisconnectFromSession,*/ DetachSession(Vec<ClientId>), TerminalPixelDimensions(PixelDimensions), BackgroundColor(String), @@ -88,7 +78,12 @@ pub enum ClientToServerMsg { Box<Layout>, Option<PluginsConfig>, ), - AttachClient(ClientAttributes, Options), + AttachClient( + ClientAttributes, + Options, + Option<usize>, // tab position to focus + Option<(u32, bool)>, // (pane_id, is_plugin) => pane id to focus + ), Action(Action, Option<ClientId>), ClientExited, KillSession, @@ -99,10 +94,6 @@ pub enum ClientToServerMsg { // Types of messages sent from the server to the client #[derive(Serialize, Deserialize, Debug, Clone)] pub enum ServerToClientMsg { - /*// Info about a particular session - SessionInfo(Session), - // A list of sessions - SessionList(HashSet<Session>),*/ Render(String), UnblockInputThread, Exit(ExitReason), @@ -110,6 +101,7 @@ pub enum ServerToClientMsg { Connected, ActiveClients(Vec<ClientId>), Log(Vec<String>), + SwitchSession(ConnectToSession), } #[derive(Serialize, Deserialize, Debug, Clone)] |
