diff options
| author | Aram Drevekenin <aram@poor.dev> | 2025-08-28 17:48:34 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-28 17:48:34 +0200 |
| commit | 3a26df6314cf5966ffb3065b97d4183b480d1441 (patch) | |
| tree | 0afc4bc62272f22c397ccab260a46bbfed4ac24f /zellij-utils/src/ipc.rs | |
| parent | fix(web): avoid sending single meta keypresses, cleanup (#4376) (diff) | |
| download | sl0ppij-3a26df6314cf5966ffb3065b97d4183b480d1441.tar.gz sl0ppij-3a26df6314cf5966ffb3065b97d4183b480d1441.tar.xz sl0ppij-3a26df6314cf5966ffb3065b97d4183b480d1441.zip | |
refactor(client-server-contract): config + layout (#4383)
* commented out ConfigWrittenToDisk instructions
* commented out WriteConfigToDisk instructions
* commented out FailedToWriteConfigToDisk and WriteConfigToDisk instructions
* pass cli assets from client to server instead of parsed config - kind of working, lots of stuff still broken
* move ClientAttributes to the server side
* move ClientAttributes to the server side in Attach instruction as well
* move CliArgs and runtime options from NewClient -> move them to the server
* moved plugin_aliases to the server side
* moved initial config writing to the server side
* moved layout parsing to the server
* some cleanups
* move config file watching and live reload to the server
* move config file writing to the server side
* use saved config when attaching
* get web server to work with the new config roles
* some cleanups
* moar cleanups
* even moar cleanups
* yet more cleanups
* fix tests
* style(fmt): rustfmt
* style(fmt): rustfmt
* fix e2e tests
* docs(changelog): add PR
Diffstat (limited to 'zellij-utils/src/ipc.rs')
| -rw-r--r-- | zellij-utils/src/ipc.rs | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/zellij-utils/src/ipc.rs b/zellij-utils/src/ipc.rs index 2ec6d8d5..57a31cd0 100644 --- a/zellij-utils/src/ipc.rs +++ b/zellij-utils/src/ipc.rs @@ -1,10 +1,8 @@ //! IPC stuff for starting to split things into a client and server model. use crate::{ - cli::CliArgs, data::{ClientId, ConnectToSession, KeyWithModifier, Style}, errors::{get_current_ctx, prelude::*, ErrorContext}, - input::config::Config, - input::{actions::Action, layout::Layout, options::Options, plugins::PluginAliases}, + input::{actions::Action, cli_assets::CliAssets}, pane_size::{Size, SizeInPixels}, }; use interprocess::local_socket::LocalSocketStream; @@ -16,7 +14,6 @@ use std::{ io::{self, Write}, marker::PhantomData, os::unix::io::{AsRawFd, FromRawFd}, - path::PathBuf, }; type SessionId = u64; @@ -71,21 +68,12 @@ pub enum ClientToServerMsg { ForegroundColor(String), ColorRegisters(Vec<(usize, String)>), TerminalResize(Size), - NewClient( - ClientAttributes, - Box<CliArgs>, - Box<Config>, // represents the saved configuration - Box<Options>, // represents the runtime configuration - Box<Layout>, - Box<PluginAliases>, - bool, // should launch setup wizard + FirstClientConnected( + CliAssets, bool, // is_web_client - bool, // layout_is_welcome_screen ), AttachClient( - ClientAttributes, - Config, // represents the saved configuration - Options, // represents the runtime configuration + CliAssets, Option<usize>, // tab position to focus Option<(u32, bool)>, // (pane_id, is_plugin) => pane id to focus bool, // is_web_client @@ -95,8 +83,6 @@ pub enum ClientToServerMsg { ClientExited, KillSession, ConnStatus, - ConfigWrittenToDisk(Config), - FailedToWriteConfigToDisk(Option<PathBuf>), WebServerStarted(String), // String -> base_url FailedToStartWebServer(String), } @@ -114,9 +100,9 @@ pub enum ServerToClientMsg { UnblockCliPipeInput(String), // String -> pipe name CliPipeOutput(String, String), // String -> pipe name, String -> Output QueryTerminalSize, - WriteConfigToDisk { config: String }, StartWebServer, RenamedSession(String), // String -> new session name + ConfigFileUpdated, } #[derive(Serialize, Deserialize, Debug, Clone)] |
