diff options
| author | Aram Drevekenin <aram@poor.dev> | 2026-06-29 18:10:59 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-06-29 18:10:59 +0200 |
| commit | 245f5141c9bb7eb91f003efac4defc94470243fd (patch) | |
| tree | 52ae6d003366f97e41c8a1450602aef63c8fdca2 /zellij-utils/src/ipc/protobuf_conversion.rs | |
| parent | feat: reload config on theme change (#5135) (diff) | |
| download | sl0ppij-245f5141c9bb7eb91f003efac4defc94470243fd.tar.gz sl0ppij-245f5141c9bb7eb91f003efac4defc94470243fd.tar.xz sl0ppij-245f5141c9bb7eb91f003efac4defc94470243fd.zip | |
Title frames (#5318)
* initial implementation
* improve single line title design
* hint text plugin infra
* add proto regen task
* display alt text in status bar
* don't display text with full frames
* style alt hover text
* fix + style control own pane hover
* make multiplayer indications responsive
* update snapshots
* plugin api
* single pane as tab
* better scroll styling
* fix tests
* tab-bar plus hover
* plugin surface tests
* integration tests
* adjust all integration tests
* reduce hover noise
* add pane id to in place
* more integration tests
* style: rustfmt
* update plugin assets
* update assets and snapshots
* add pr
Diffstat (limited to 'zellij-utils/src/ipc/protobuf_conversion.rs')
| -rw-r--r-- | zellij-utils/src/ipc/protobuf_conversion.rs | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/zellij-utils/src/ipc/protobuf_conversion.rs b/zellij-utils/src/ipc/protobuf_conversion.rs index c4941676..f1ad8118 100644 --- a/zellij-utils/src/ipc/protobuf_conversion.rs +++ b/zellij-utils/src/ipc/protobuf_conversion.rs @@ -1,3 +1,5 @@ +use std::str::FromStr; + use crate::{ client_server_contract::client_server_contract::{ client_to_server_msg, server_to_client_msg, ActionMsg, AttachClientMsg, @@ -766,6 +768,11 @@ impl From<crate::input::options::Options> }), mobile_threshold_cols: options.mobile_threshold_cols.map(|v| v as u32), mobile_threshold_rows: options.mobile_threshold_rows.map(|v| v as u32), + pane_frame_style: options.pane_frame_style.map(|s| match s { + crate::input::options::PaneFrameStyle::Full => "full".to_owned(), + crate::input::options::PaneFrameStyle::Titles => "titles".to_owned(), + crate::input::options::PaneFrameStyle::None => "none".to_owned(), + }), } } } @@ -798,6 +805,12 @@ impl TryFrom<crate::client_server_contract::client_server_contract::Options> theme_dir: options.theme_dir.map(std::path::PathBuf::from), mouse_mode: options.mouse_mode, pane_frames: options.pane_frames, + pane_frame_style: options.pane_frame_style.as_deref().and_then(|s| match s { + "full" => Some(crate::input::options::PaneFrameStyle::Full), + "titles" => Some(crate::input::options::PaneFrameStyle::Titles), + "none" => Some(crate::input::options::PaneFrameStyle::None), + _ => None, + }), mirror_session: options.mirror_session, on_force_close: options .on_force_close @@ -999,6 +1012,7 @@ impl From<crate::input::actions::Action> SetLightThemeAction, SetPaneBorderlessAction, SetPaneColorAction, + SetPaneFrameStyleAction, ShowFloatingPanesAction, SkipConfirmAction, StackPanesAction, @@ -1177,6 +1191,16 @@ impl From<crate::input::actions::Action> crate::input::actions::Action::TogglePaneFrames => { ActionType::TogglePaneFrames(TogglePaneFramesAction {}) }, + crate::input::actions::Action::SetPaneFrameStyle(style) => { + let style = match style { + crate::input::options::PaneFrameStyle::Full => "full", + crate::input::options::PaneFrameStyle::Titles => "titles", + crate::input::options::PaneFrameStyle::None => "none", + }; + ActionType::SetPaneFrameStyle(SetPaneFrameStyleAction { + style: style.to_owned(), + }) + }, crate::input::actions::Action::ToggleActiveSyncTab => { ActionType::ToggleActiveSyncTab(ToggleActiveSyncTabAction {}) }, @@ -2037,6 +2061,13 @@ impl TryFrom<crate::client_server_contract::client_server_contract::Action> Ok(crate::input::actions::Action::ToggleFocusFullscreen) }, ActionType::TogglePaneFrames(_) => Ok(crate::input::actions::Action::TogglePaneFrames), + ActionType::SetPaneFrameStyle(set_pane_frame_style_action) => { + let style = crate::input::options::PaneFrameStyle::from_str( + &set_pane_frame_style_action.style, + ) + .map_err(|e| anyhow!("{}", e))?; + Ok(crate::input::actions::Action::SetPaneFrameStyle(style)) + }, ActionType::ToggleActiveSyncTab(_) => { Ok(crate::input::actions::Action::ToggleActiveSyncTab) }, |
