summaryrefslogtreecommitdiff
path: root/src/workspace.rs
diff options
context:
space:
mode:
authorCan Celik <ogulcancelik@gmail.com>2026-08-03 02:05:27 +0300
committerGitHub <noreply@github.com>2026-08-03 02:05:27 +0300
commit10eb0bc744165ae91dfce9fd731fe170410b34ec (patch)
tree8622d429d9453c2e8d06630322804a702973d94a /src/workspace.rs
parentcbc31d34a1fb3da64415737de57ad10fe6af5ba5 (diff)
fix: propagate host color scheme to pane apps (#2214)
refs #714
Diffstat (limited to 'src/workspace.rs')
-rw-r--r--src/workspace.rs38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/workspace.rs b/src/workspace.rs
index 23e35322..0d0e35bd 100644
--- a/src/workspace.rs
+++ b/src/workspace.rs
@@ -276,6 +276,7 @@ impl Workspace {
cols: u16,
scrollback_limit_bytes: usize,
host_terminal_theme: crate::terminal_theme::TerminalTheme,
+ host_terminal_appearance: Option<crate::terminal_theme::HostAppearance>,
shell_config: crate::pane::PaneShellConfig<'_>,
events: mpsc::Sender<AppEvent>,
render_notify: Arc<Notify>,
@@ -287,6 +288,7 @@ impl Workspace {
cols,
scrollback_limit_bytes,
host_terminal_theme,
+ host_terminal_appearance,
shell_config,
events,
render_notify,
@@ -302,6 +304,7 @@ impl Workspace {
cols: u16,
scrollback_limit_bytes: usize,
host_terminal_theme: crate::terminal_theme::TerminalTheme,
+ host_terminal_appearance: Option<crate::terminal_theme::HostAppearance>,
shell_config: crate::pane::PaneShellConfig<'_>,
events: mpsc::Sender<AppEvent>,
render_notify: Arc<Notify>,
@@ -314,6 +317,7 @@ impl Workspace {
cols,
scrollback_limit_bytes,
host_terminal_theme,
+ host_terminal_appearance,
shell_config,
events,
render_notify,
@@ -332,6 +336,7 @@ impl Workspace {
argv: &[String],
scrollback_limit_bytes: usize,
host_terminal_theme: crate::terminal_theme::TerminalTheme,
+ host_terminal_appearance: Option<crate::terminal_theme::HostAppearance>,
events: mpsc::Sender<AppEvent>,
render_notify: Arc<Notify>,
render_dirty: Arc<RenderSignal>,
@@ -343,6 +348,7 @@ impl Workspace {
argv,
scrollback_limit_bytes,
host_terminal_theme,
+ host_terminal_appearance,
events,
render_notify,
render_dirty,
@@ -358,6 +364,7 @@ impl Workspace {
argv: &[String],
scrollback_limit_bytes: usize,
host_terminal_theme: crate::terminal_theme::TerminalTheme,
+ host_terminal_appearance: Option<crate::terminal_theme::HostAppearance>,
events: mpsc::Sender<AppEvent>,
render_notify: Arc<Notify>,
render_dirty: Arc<RenderSignal>,
@@ -369,6 +376,7 @@ impl Workspace {
cols,
scrollback_limit_bytes,
host_terminal_theme,
+ host_terminal_appearance,
crate::pane::PaneShellConfig::new("", crate::config::ShellModeConfig::NonLogin),
events,
render_notify,
@@ -385,6 +393,7 @@ impl Workspace {
cols: u16,
scrollback_limit_bytes: usize,
host_terminal_theme: crate::terminal_theme::TerminalTheme,
+ host_terminal_appearance: Option<crate::terminal_theme::HostAppearance>,
shell_config: crate::pane::PaneShellConfig<'_>,
events: mpsc::Sender<AppEvent>,
render_notify: Arc<Notify>,
@@ -407,6 +416,7 @@ impl Workspace {
argv,
scrollback_limit_bytes,
host_terminal_theme,
+ host_terminal_appearance,
&launch_env,
events,
render_notify,
@@ -420,6 +430,7 @@ impl Workspace {
cols,
scrollback_limit_bytes,
host_terminal_theme,
+ host_terminal_appearance,
shell_config,
&launch_env,
events,
@@ -501,6 +512,7 @@ impl Workspace {
cwd: PathBuf,
scrollback_limit_bytes: usize,
host_terminal_theme: crate::terminal_theme::TerminalTheme,
+ host_terminal_appearance: Option<crate::terminal_theme::HostAppearance>,
shell_config: crate::pane::PaneShellConfig<'_>,
extra_env: Vec<(String, String)>,
) -> std::io::Result<(usize, TerminalState, TerminalRuntime)> {
@@ -510,6 +522,7 @@ impl Workspace {
cwd,
scrollback_limit_bytes,
host_terminal_theme,
+ host_terminal_appearance,
shell_config,
None,
extra_env,
@@ -525,6 +538,7 @@ impl Workspace {
extra_env: Vec<(String, String)>,
scrollback_limit_bytes: usize,
host_terminal_theme: crate::terminal_theme::TerminalTheme,
+ host_terminal_appearance: Option<crate::terminal_theme::HostAppearance>,
) -> std::io::Result<(usize, TerminalState, TerminalRuntime)> {
self.create_tab_with_runtime(
rows,
@@ -532,6 +546,7 @@ impl Workspace {
cwd,
scrollback_limit_bytes,
host_terminal_theme,
+ host_terminal_appearance,
crate::pane::PaneShellConfig::new("", crate::config::ShellModeConfig::NonLogin),
Some(argv),
extra_env,
@@ -545,6 +560,7 @@ impl Workspace {
cwd: PathBuf,
scrollback_limit_bytes: usize,
host_terminal_theme: crate::terminal_theme::TerminalTheme,
+ host_terminal_appearance: Option<crate::terminal_theme::HostAppearance>,
shell_config: crate::pane::PaneShellConfig<'_>,
argv: Option<&[String]>,
extra_env: Vec<(String, String)>,
@@ -575,6 +591,7 @@ impl Workspace {
argv,
scrollback_limit_bytes,
host_terminal_theme,
+ host_terminal_appearance,
&launch_env,
events,
render_notify,
@@ -588,6 +605,7 @@ impl Workspace {
cols,
scrollback_limit_bytes,
host_terminal_theme,
+ host_terminal_appearance,
shell_config,
&launch_env,
events,
@@ -655,6 +673,7 @@ impl Workspace {
cwd: Option<PathBuf>,
scrollback_limit_bytes: usize,
host_terminal_theme: crate::terminal_theme::TerminalTheme,
+ host_terminal_appearance: Option<crate::terminal_theme::HostAppearance>,
shell_config: crate::pane::PaneShellConfig<'_>,
extra_env: Vec<(String, String)>,
) -> std::io::Result<crate::workspace::tab::NewPane> {
@@ -674,6 +693,7 @@ impl Workspace {
cwd,
scrollback_limit_bytes,
host_terminal_theme,
+ host_terminal_appearance,
shell_config,
&launch_env,
)?;
@@ -692,6 +712,7 @@ impl Workspace {
extra_env: Vec<(String, String)>,
scrollback_limit_bytes: usize,
host_terminal_theme: crate::terminal_theme::TerminalTheme,
+ host_terminal_appearance: Option<crate::terminal_theme::HostAppearance>,
) -> std::io::Result<crate::workspace::tab::NewPane> {
let pane_number = self.next_public_pane_number;
let tab_number = self
@@ -711,11 +732,14 @@ impl Workspace {
&launch_env,
scrollback_limit_bytes,
host_terminal_theme,
+ host_terminal_appearance,
)?;
self.register_new_pane_with_number(new_pane.pane_id, pane_number);
Ok(new_pane)
}
+ // Workspace split routing carries pane identity, geometry, host context, and focus policy.
+ #[allow(clippy::too_many_arguments)]
pub fn split_pane(
&mut self,
pane_id: PaneId,
@@ -725,6 +749,7 @@ impl Workspace {
cwd: Option<PathBuf>,
scrollback_limit_bytes: usize,
host_terminal_theme: crate::terminal_theme::TerminalTheme,
+ host_terminal_appearance: Option<crate::terminal_theme::HostAppearance>,
shell_config: crate::pane::PaneShellConfig<'_>,
extra_env: Vec<(String, String)>,
focus_new_pane: bool,
@@ -738,6 +763,7 @@ impl Workspace {
cwd,
scrollback_limit_bytes,
host_terminal_theme,
+ host_terminal_appearance,
shell_config,
extra_env,
focus_new_pane,
@@ -756,6 +782,7 @@ impl Workspace {
cwd: Option<PathBuf>,
scrollback_limit_bytes: usize,
host_terminal_theme: crate::terminal_theme::TerminalTheme,
+ host_terminal_appearance: Option<crate::terminal_theme::HostAppearance>,
shell_config: crate::pane::PaneShellConfig<'_>,
extra_env: Vec<(String, String)>,
focus_new_pane: bool,
@@ -769,6 +796,7 @@ impl Workspace {
cwd,
scrollback_limit_bytes,
host_terminal_theme,
+ host_terminal_appearance,
shell_config,
extra_env,
focus_new_pane,
@@ -788,6 +816,7 @@ impl Workspace {
extra_env: Vec<(String, String)>,
scrollback_limit_bytes: usize,
host_terminal_theme: crate::terminal_theme::TerminalTheme,
+ host_terminal_appearance: Option<crate::terminal_theme::HostAppearance>,
focus_new_pane: bool,
) -> Option<std::io::Result<(usize, crate::workspace::tab::NewPane)>> {
self.split_pane_with_runtime(
@@ -799,6 +828,7 @@ impl Workspace {
cwd,
scrollback_limit_bytes,
host_terminal_theme,
+ host_terminal_appearance,
crate::pane::PaneShellConfig::new("", crate::config::ShellModeConfig::NonLogin),
extra_env,
focus_new_pane,
@@ -819,6 +849,7 @@ impl Workspace {
extra_env: Vec<(String, String)>,
scrollback_limit_bytes: usize,
host_terminal_theme: crate::terminal_theme::TerminalTheme,
+ host_terminal_appearance: Option<crate::terminal_theme::HostAppearance>,
focus_new_pane: bool,
) -> Option<std::io::Result<(usize, crate::workspace::tab::NewPane)>> {
self.split_pane_with_runtime(
@@ -830,6 +861,7 @@ impl Workspace {
cwd,
scrollback_limit_bytes,
host_terminal_theme,
+ host_terminal_appearance,
crate::pane::PaneShellConfig::new("", crate::config::ShellModeConfig::NonLogin),
extra_env,
focus_new_pane,
@@ -848,6 +880,7 @@ impl Workspace {
cwd: Option<PathBuf>,
scrollback_limit_bytes: usize,
host_terminal_theme: crate::terminal_theme::TerminalTheme,
+ host_terminal_appearance: Option<crate::terminal_theme::HostAppearance>,
shell_config: crate::pane::PaneShellConfig<'_>,
extra_env: Vec<(String, String)>,
focus_new_pane: bool,
@@ -872,6 +905,7 @@ impl Workspace {
&launch_env,
scrollback_limit_bytes,
host_terminal_theme,
+ host_terminal_appearance,
),
None => tab.split_focused_argv_command(
direction,
@@ -882,6 +916,7 @@ impl Workspace {
&launch_env,
scrollback_limit_bytes,
host_terminal_theme,
+ host_terminal_appearance,
),
}
} else {
@@ -894,6 +929,7 @@ impl Workspace {
cwd,
scrollback_limit_bytes,
host_terminal_theme,
+ host_terminal_appearance,
shell_config,
&launch_env,
),
@@ -904,6 +940,7 @@ impl Workspace {
cwd,
scrollback_limit_bytes,
host_terminal_theme,
+ host_terminal_appearance,
shell_config,
&launch_env,
),
@@ -1663,6 +1700,7 @@ mod tests {
&argv,
1024,
crate::terminal_theme::TerminalTheme::default(),
+ None,
events,
render_notify,
render_dirty,