diff options
| author | Aram Drevekenin <aram@poor.dev> | 2026-04-28 17:14:59 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-04-28 17:14:59 +0200 |
| commit | 227142dd567ee72bcc137c116bc1ce2b818975e7 (patch) | |
| tree | 8958a994dddb80bf20ce1e6bf2694687736b0b19 /zellij-utils/src/ipc.rs | |
| parent | upgrade rustls-webpki (#5106) (diff) | |
| download | sl0ppij-227142dd567ee72bcc137c116bc1ce2b818975e7.tar.gz sl0ppij-227142dd567ee72bcc137c116bc1ce2b818975e7.tar.xz sl0ppij-227142dd567ee72bcc137c116bc1ce2b818975e7.zip | |
Support CSI2031 (dark/light theme switching) + remove STDIN cache to avoid stale color queries (#5105)
* initial phase 1 implementation
* various fies
* some fixes
* fix fragmented stdin cases
* some fixes
* renaming
* guard against old clients
* implement csi 2031
* allow toggling theme with actions
* rustfmt
* fix: finalize trailing characters in ansi parser as well
* add pr
Diffstat (limited to 'zellij-utils/src/ipc.rs')
| -rw-r--r-- | zellij-utils/src/ipc.rs | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/zellij-utils/src/ipc.rs b/zellij-utils/src/ipc.rs index 854ef0b9..5f54478d 100644 --- a/zellij-utils/src/ipc.rs +++ b/zellij-utils/src/ipc.rs @@ -1,6 +1,6 @@ //! IPC stuff for starting to split things into a client and server model. use crate::{ - data::{ClientId, ConnectToSession, KeyWithModifier, PaneId, Style}, + data::{ClientId, ConnectToSession, HostTerminalThemeMode, KeyWithModifier, PaneId, Style}, errors::{prelude::*, ErrorContext}, input::{actions::Action, cli_assets::CliAssets}, pane_size::{Size, SizeInPixels}, @@ -156,6 +156,21 @@ pub enum ClientToServerMsg { DesktopNotificationResponse { raw_bytes: Vec<u8>, }, + /// Raw reply bytes observed by the client inside a forwarding window + /// closed by the Primary-DA barrier. The server routes these bytes + /// verbatim to the pane whose app issued the whitelisted query + /// (tracked on the server by `token`). + ForwardedReplyFromHost { + token: u32, + reply_bytes: Vec<u8>, + }, + /// The host terminal reported a color-palette theme mode (DSR 997 reply + /// to `CSI ? 996 n`, or unsolicited notification while `CSI ? 2031 h` + /// is enabled). The server propagates this to the active configured + /// theme and to subscribed plugins/panes. + HostTerminalThemeChanged { + mode: HostTerminalThemeMode, + }, } // Types of messages sent from the server to the client @@ -200,6 +215,14 @@ pub enum ServerToClientMsg { SubscribedPaneClosed { pane_id: PaneId, }, + /// Instruct the client to write `query_bytes` followed by the + /// Primary-DA barrier to stdout, open a forwarding window keyed by + /// `token`, and reply with a `ForwardedReplyFromHost` once the + /// barrier closes or the window times out. + ForwardQueryToHost { + token: u32, + query_bytes: Vec<u8>, + }, } #[derive(Serialize, Deserialize, Debug, Clone, PartialEq)] |
