diff options
author | Aram Drevekenin <aram@poor.dev> | 2024-07-05 15:13:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-05 15:13:51 +0200 |
commit | a6d6c0e4ff03c35cafb6f04363ecab856ee3682d (patch) | |
tree | eadf1c24c4c6a1e4b7499b3cd047351fd29e52de /zellij-server/src/lib.rs | |
parent | 8e33b20559ecddcaba17e5cc8d6f05b638718cac (diff) |
feat(ui): status bar redesign (#3475)
* work
* work
* working
* get default mode from server and some ui responsiveness
* work
* finish design and get tests to pass
* get e2e tests to pass
* add classic layout
* add classic layout assets
* fix e2e tests
* style(fmt): rustfmt
* fix plugin system test
* style(fmt): some cleanups
Diffstat (limited to 'zellij-server/src/lib.rs')
-rw-r--r-- | zellij-server/src/lib.rs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/zellij-server/src/lib.rs b/zellij-server/src/lib.rs index aaedabd7d..9a3231b3c 100644 --- a/zellij-server/src/lib.rs +++ b/zellij-server/src/lib.rs @@ -149,6 +149,7 @@ pub(crate) struct SessionMetaData { pub config_options: Box<Options>, pub client_keybinds: HashMap<ClientId, Keybinds>, pub client_input_modes: HashMap<ClientId, InputMode>, + pub default_mode: InputMode, screen_thread: Option<thread::JoinHandle<()>>, pty_thread: Option<thread::JoinHandle<()>>, plugin_thread: Option<thread::JoinHandle<()>>, @@ -565,7 +566,12 @@ pub fn start_server(mut os_input: Box<dyn ServerOsApi>, socket_path: PathBuf) { .send_to_plugin(PluginInstruction::AddClient(client_id)) .unwrap(); let default_mode = options.default_mode.unwrap_or_default(); - let mode_info = get_mode_info(default_mode, &attrs, session_data.capabilities); + let mode_info = get_mode_info( + default_mode, + &attrs, + session_data.capabilities, + Some(default_mode), + ); session_data .senders .send_to_screen(ScreenInstruction::ChangeMode(mode_info.clone(), client_id)) @@ -999,6 +1005,8 @@ fn init_session( .clone() .unwrap_or_else(|| get_default_shell()); + let default_mode = config_options.default_mode.unwrap_or_default(); + let pty_thread = thread::Builder::new() .name("pty".to_string()) .spawn({ @@ -1089,6 +1097,7 @@ fn init_session( client_attributes, default_shell, plugin_aliases, + default_mode, ) .fatal() } @@ -1158,6 +1167,7 @@ fn init_session( plugin_thread: Some(plugin_thread), pty_writer_thread: Some(pty_writer_thread), background_jobs_thread: Some(background_jobs_thread), + default_mode, } } |