A modern terminal with a built-in multiplexer: close it and your sessions keep running. Run shells and tons of AI agents across your machines, then pick them up from desktop, browser, TUI and more. Written in Rust with no UI framework: interface drawn straight on the GPU. No Electron, GPUI or webview.
Rust agentagent-orchestrationaiai-agentsclaude-codecodexcoding-agentlinuxmacosmultiplayermultiplexerrustterminalterminal-emulatorterminal-multiplexertmuxtuiweztermwindows
Add Home font size and simplify onboarding, improvement performance on windows
RoversXa2626c9465ed
diff --git a/wezterm-gui/src/native_settings.rs b/wezterm-gui/src/native_settings.rsindex e3b823c0..acd55c3f 100644--- a/wezterm-gui/src/native_settings.rs+++ b/wezterm-gui/src/native_settings.rs@@ -8,6 +8,10 @@ use window::{Appearance, Connection, ConnectionOps};pub(crate) const DEFAULT_SETTINGS_FONT_SIZE: f64 = 14.0;pub(crate) const DEFAULT_SETTINGS_FONT_WEIGHT: u16 = 600;+#[cfg(target_os = "windows")]+pub(crate) const DEFAULT_HOME_FONT_SIZE: f64 = 14.0;+#[cfg(not(target_os = "windows"))]+pub(crate) const DEFAULT_HOME_FONT_SIZE: f64 = 15.0;pub(crate) const DEFAULT_SIDEBAR_FONT_SIZE: f64 = 15.0;pub(crate) const DEFAULT_TAB_FONT_SIZE: f64 = 14.0;pub(crate) const DEFAULT_PANE_HEADER_FONT_SIZE: f64 = 14.0;@@ -185,6 +189,7 @@ pub(crate) struct NativeTerminalSettings {pub(crate) struct NativeChromeSettings {pub(crate) settings_font_size: Option<f64>,pub(crate) settings_font_weight: Option<u16>,+ pub(crate) home_font_size: Option<f64>,pub(crate) sidebar_font_size: Option<f64>,pub(crate) workspace_sidebar_width: Option<usize>,pub(crate) right_sidebar_width: Option<usize>,@@ -410,6 +415,14 @@ pub(crate) fn settings_font_weight(settings: &ThinkTermNativeSettings) -> u16 {.clamp(300, 800)}+pub(crate) fn home_font_size(settings: &ThinkTermNativeSettings) -> f64 {+ settings+ .chrome+ .home_font_size+ .unwrap_or(DEFAULT_HOME_FONT_SIZE)+ .clamp(10.0, 28.0)+}+pub(crate) fn sidebar_font_size() -> f64 {load().chromediff --git a/wezterm-gui/src/settings_window.rs b/wezterm-gui/src/settings_window.rsindex 12a94feb..d4ddbf31 100644--- a/wezterm-gui/src/settings_window.rs+++ b/wezterm-gui/src/settings_window.rs@@ -35,8 +35,8 @@ use window::{use crate::native_settings::{NativeAppIcon, NativeRendererBackend, NativeThemeMode, ThinkTermNativeSettings,- DEFAULT_PANE_HEADER_FONT_SIZE, DEFAULT_SETTINGS_FONT_SIZE, DEFAULT_SIDEBAR_FONT_SIZE,- DEFAULT_TAB_FONT_SIZE,+ DEFAULT_HOME_FONT_SIZE, DEFAULT_PANE_HEADER_FONT_SIZE, DEFAULT_SETTINGS_FONT_SIZE,+ DEFAULT_SIDEBAR_FONT_SIZE, DEFAULT_TAB_FONT_SIZE,};const DEFAULT_WIDTH: usize = 1840;@@ -621,6 +621,7 @@ impl MemorySnapshot {#[derive(Debug, Clone, Copy, PartialEq, Eq)]enum ChromeFontArea {Settings,+ Home,Sidebar,TabBar,PaneHeader,@@ -630,6 +631,7 @@ impl ChromeFontArea {fn label(self) -> &'static str {match self {Self::Settings => "Settings UI Font Size",+ Self::Home => "Home Font Size",Self::Sidebar => "Workspace Sidebar Font Size",Self::TabBar => "Tab Bar Font Size",Self::PaneHeader => "Pane Header Font Size",@@ -639,6 +641,7 @@ impl ChromeFontArea {fn description(self) -> &'static str {match self {Self::Settings => "Controls the Settings window chrome and content text.",+ Self::Home => "Controls the main home/content view text.",Self::Sidebar => "Saved separately for the main workspace sidebar.",Self::TabBar => "Saved separately for the top terminal tab bar.",Self::PaneHeader => "Saved separately for split-pane header labels.",@@ -648,6 +651,7 @@ impl ChromeFontArea {fn default_size(self) -> f64 {match self {Self::Settings => DEFAULT_SETTINGS_FONT_SIZE,+ Self::Home => DEFAULT_HOME_FONT_SIZE,Self::Sidebar => DEFAULT_SIDEBAR_FONT_SIZE,Self::TabBar => DEFAULT_TAB_FONT_SIZE,Self::PaneHeader => DEFAULT_PANE_HEADER_FONT_SIZE,@@ -1863,6 +1867,7 @@ impl SettingsWindow {fn current_chrome_font_size_value(&self, area: ChromeFontArea) -> f64 {let value = match area {ChromeFontArea::Settings => self.native_settings.chrome.settings_font_size,+ ChromeFontArea::Home => self.native_settings.chrome.home_font_size,ChromeFontArea::Sidebar => self.native_settings.chrome.sidebar_font_size,ChromeFontArea::TabBar => self.native_settings.chrome.tab_font_size,ChromeFontArea::PaneHeader => self.native_settings.chrome.pane_header_font_size,@@ -1873,6 +1878,7 @@ impl SettingsWindow {fn set_chrome_font_size_value(&mut self, area: ChromeFontArea, value: Option<f64>) {match area {ChromeFontArea::Settings => self.native_settings.chrome.settings_font_size = value,+ ChromeFontArea::Home => self.native_settings.chrome.home_font_size = value,ChromeFontArea::Sidebar => self.native_settings.chrome.sidebar_font_size = value,ChromeFontArea::TabBar => self.native_settings.chrome.tab_font_size = value,ChromeFontArea::PaneHeader => self.native_settings.chrome.pane_header_font_size = value,@@ -3292,7 +3298,7 @@ impl SettingsWindow {let row_step = self.settings_row_step();let section_y = CONTENT_SECTION_Y - scroll;let theme_row_count = 4;- let typography_row_count = 5;+ let typography_row_count = 6;let (theme_card_y, mut y) = self.settings_card_geometry(section_y, theme_row_count);let theme_card_height = self.settings_card_height(theme_row_count);let typography_title_y =@@ -3383,6 +3389,7 @@ impl SettingsWindow {y = typography_first_row_y;for area in [ChromeFontArea::Settings,+ ChromeFontArea::Home,ChromeFontArea::Sidebar,ChromeFontArea::TabBar,ChromeFontArea::PaneHeader,diff --git a/wezterm-gui/src/termwindow/onboarding.rs b/wezterm-gui/src/termwindow/onboarding.rsindex dfa68829..f8110f03 100644--- a/wezterm-gui/src/termwindow/onboarding.rs+++ b/wezterm-gui/src/termwindow/onboarding.rs@@ -26,10 +26,6 @@ const FOOTER_H: f32 = 150.0;const PROJECT_ROW_H: f32 = 118.0;const PROJECT_ROW_GAP: f32 = 10.0;const TRANSITION_MS: u64 = 280;-const TRANSITION_IN_START_T: f32 = 0.52;-const TRANSITION_OUT_END_T: f32 = 0.48;-const TRANSITION_ENTER_SLIDE: f32 = 28.0;-const TRANSITION_EXIT_SLIDE: f32 = 18.0;#[derive(Debug, Clone, Copy, PartialEq, Eq)]enum Step {@@ -170,7 +166,6 @@ enum OnboardingAction {struct StepTransition {from: Step,to: Step,- direction: f32,started_at: Instant,}@@ -270,7 +265,7 @@ impl OnboardingView {.count()}- fn start_step_transition(&mut self, next: Step, direction: f32) {+ fn start_step_transition(&mut self, next: Step, _direction: f32) {let from = self.step;if from == next {return;@@ -283,7 +278,6 @@ impl OnboardingView {self.transition = Some(StepTransition {from,to: next,- direction,started_at: Instant::now(),});}@@ -550,32 +544,6 @@ impl OnboardingView {t * t * (3.0 - 2.0 * t)}- fn ease_out_cubic(t: f32) -> f32 {- let t = t.clamp(0.0, 1.0);- 1.0 - (1.0 - t).powi(3)- }-- fn faded_palette(mut palette: UiPalette, alpha: f32) -> UiPalette {- let alpha = alpha.clamp(0.0, 1.0);- palette.separator = palette.separator.mul_alpha(alpha);- palette.control_bg = palette.control_bg.mul_alpha(alpha);- palette.control_hover_bg = palette.control_hover_bg.mul_alpha(alpha);- palette.control_pressed_bg = palette.control_pressed_bg.mul_alpha(alpha);- palette.control_border = palette.control_border.mul_alpha(alpha);- palette.sidebar_button_bg = palette.sidebar_button_bg.mul_alpha(alpha);- palette.sidebar_button_hover_bg = palette.sidebar_button_hover_bg.mul_alpha(alpha);- palette.sidebar_row_hover_bg = palette.sidebar_row_hover_bg.mul_alpha(alpha);- palette.sidebar_row_active_bg = palette.sidebar_row_active_bg.mul_alpha(alpha);- palette.sidebar_row_active_border = palette.sidebar_row_active_border.mul_alpha(alpha);- palette.selected_bg = palette.selected_bg.mul_alpha(alpha);- palette.text = palette.text.mul_alpha(alpha);- palette.secondary_text = palette.secondary_text.mul_alpha(alpha);- palette.muted_text = palette.muted_text.mul_alpha(alpha);- palette.selected_text = palette.selected_text.mul_alpha(alpha);- palette.scrollbar_thumb = palette.scrollbar_thumb.mul_alpha(alpha);- palette- }-fn transition_t(&self) -> Option<f32> {self.transition.map(|transition| {let elapsed = transition.started_at.elapsed();@@ -606,24 +574,6 @@ impl OnboardingView {Ok(())}- fn paint_body_for_step_without_widgets(- &mut self,- ctx: &DrawContext,- layers: &mut TripleLayerQuadAllocator<'_>,- step: Step,- body: RectF,- palette: UiPalette,- font: &Rc<LoadedFont>,- tokens: UiTokens,- section_font: &Rc<LoadedFont>,- ) -> anyhow::Result<()> {- let real_widgets = std::mem::take(&mut self.widgets);- let result =- self.paint_body_for_step(ctx, layers, step, body, palette, font, tokens, section_font);- self.widgets = real_widgets;- result- }-fn paint_body(&mut self,ctx: &DrawContext,@@ -634,76 +584,20 @@ impl OnboardingView {tokens: UiTokens,section_font: &Rc<LoadedFont>,) -> anyhow::Result<()> {- let Some(transition) = self.transition else {- return self.paint_body_for_step(- ctx,- layers,- self.step,- body,- palette,- font,- tokens,- section_font,- );- };-- let raw_t = self.transition_t().unwrap_or(1.0);- if raw_t >= 1.0 {+ if self.transition_t().is_some_and(|raw_t| raw_t >= 1.0) {self.transition = None;- return self.paint_body_for_step(- ctx,- layers,- self.step,- body,- palette,- font,- tokens,- section_font,- );}- let direction = transition.direction;- if raw_t < TRANSITION_OUT_END_T {- let t = Self::ease_out_cubic(raw_t / TRANSITION_OUT_END_T);- let outgoing = rect(- body.origin.x - direction * TRANSITION_EXIT_SLIDE * t,- body.origin.y,- body.size.width,- body.size.height,- );- self.paint_body_for_step_without_widgets(- ctx,- layers,- transition.from,- outgoing,- Self::faded_palette(palette, 1.0 - t),- font,- tokens,- section_font,- )?;- }- if raw_t >= TRANSITION_IN_START_T {- let t = Self::ease_out_cubic(- (raw_t - TRANSITION_IN_START_T) / (1.0 - TRANSITION_IN_START_T),- );- let incoming = rect(- body.origin.x + direction * TRANSITION_ENTER_SLIDE * (1.0 - t),- body.origin.y,- body.size.width,- body.size.height,- );- self.paint_body_for_step(- ctx,- layers,- transition.to,- incoming,- Self::faded_palette(palette, t),- font,- tokens,- section_font,- )?;- }- Ok(())+ self.paint_body_for_step(+ ctx,+ layers,+ self.step,+ body,+ palette,+ font,+ tokens,+ section_font,+ )}fn paint_impl(@@ -1275,7 +1169,7 @@ impl OnboardingView {let track_x = area.origin.x + area.size.width - track_w;let center_y = area.origin.y + area.size.height / 2.0;let segment_w = track_w / steps.len().max(1) as f32;- let active_progress = palette.secondary_text.mul_alpha(0.78);+ let active_progress = palette.secondary_text;ctx.draw_rounded_rect(layers,0,@@ -1283,7 +1177,7 @@ impl OnboardingView {center_y - 2.0,track_w,4.0,- palette.control_border.mul_alpha(0.55),+ palette.control_border,2.0,)?;let fill_w = segment_w * (progress_index + 1.0);@@ -1305,7 +1199,7 @@ impl OnboardingView {let cx = track_x + segment_w * idx as f32 + segment_w / 2.0;let size = 14.0 + 4.0 * active_strength;let color = if complete || active || active_strength > 0.01 {- active_progress.mul_alpha((0.58 + active_strength * 0.42).clamp(0.0, 1.0))+ active_progress} else {palette.control_border};diff --git a/wezterm-gui/src/termwindow/render/paint.rs b/wezterm-gui/src/termwindow/render/paint.rsindex e26d4268..b3234390 100644--- a/wezterm-gui/src/termwindow/render/paint.rs+++ b/wezterm-gui/src/termwindow/render/paint.rs@@ -191,7 +191,7 @@ impl crate::TermWindow {layers: &mut TripleLayerQuadAllocator<'_>,) -> anyhow::Result<()> {let settings = crate::native_settings::load();- let font_size = crate::native_settings::settings_font_size(&settings);+ let font_size = crate::native_settings::home_font_size(&settings);let font_weight = crate::native_settings::settings_font_weight(&settings);let ui_font = self.fontsdiff --git a/wezterm-gui/src/termwindow/ui/context_menu.rs b/wezterm-gui/src/termwindow/ui/context_menu.rsindex a6e7a0ef..84d8e61b 100644--- a/wezterm-gui/src/termwindow/ui/context_menu.rs+++ b/wezterm-gui/src/termwindow/ui/context_menu.rs@@ -17,7 +17,6 @@ use wezterm_font::LoadedFont;const MENU_MIN_WIDTH: usize = 220;const MENU_MAX_WIDTH: usize = 500;const MENU_WINDOW_MARGIN: usize = 12;-const MENU_FONT_SIZE: f64 = 15.0;const MENU_PADDING_X: usize = 14;const MENU_PADDING_Y: usize = 10;const MENU_LABEL_GAP: usize = 12;@@ -270,9 +269,11 @@ impl crate::TermWindow {let items = menu.items.clone();let active_path = menu.active_path.clone();+ let native_settings = crate::native_settings::load();+ let menu_font_size = crate::native_settings::home_font_size(&native_settings);let ui_font = self.fonts- .title_font_with_size(MENU_FONT_SIZE)+ .title_font_with_size(menu_font_size).context("context menu ui font")?;let ui_metrics = RenderMetrics::with_font_metrics(&ui_font.metrics());let row_height = (ui_metrics.cell_size.height as usize + MENU_ROW_EXTRA_HEIGHT).max(28);@@ -770,8 +771,8 @@ fn menu_icon(icon: &str) -> Option<SvgIcon> {"pin.slash" => Some(SvgIcon::PinOff),"plus" => Some(SvgIcon::Plus),"plus.square" => Some(SvgIcon::SquarePlus),- "rectangle.split.1x2" => Some(SvgIcon::SplitHorizontal),- "rectangle.split.2x1" => Some(SvgIcon::SplitVertical),+ "rectangle.split.1x2" => Some(SvgIcon::SplitVertical),+ "rectangle.split.2x1" => Some(SvgIcon::SplitHorizontal),"sidebar.leading" => Some(SvgIcon::PanelLeft),"square.and.pencil" => Some(SvgIcon::NotebookTabs),"square.stack" => Some(SvgIcon::SquareStack),diff --git a/wezterm-gui/src/termwindow/ui/right_sidebar.rs b/wezterm-gui/src/termwindow/ui/right_sidebar.rsindex f3e45d1f..61464de2 100644--- a/wezterm-gui/src/termwindow/ui/right_sidebar.rs+++ b/wezterm-gui/src/termwindow/ui/right_sidebar.rs@@ -641,7 +641,8 @@ impl crate::TermWindow {let foreground = chrome.text;let muted_fg = chrome.secondary_text;let sidebar_bg = chrome.workspace_sidebar_bg;- let base_font_size = crate::native_settings::sidebar_font_size().clamp(12.0, 15.0);+ let settings = crate::native_settings::load();+ let base_font_size = crate::native_settings::home_font_size(&settings);let ui_font = self.fonts.title_font_with_size(base_font_size)@@ -816,13 +817,15 @@ impl crate::TermWindow {RightSidebarMode::Tasks,RightSidebarMode::Snippets,];+ const MODE_LABEL_CLIP_SLOP: usize = 4;let mode_icon_size = (ui_cell_height + 12).clamp(24, 30).min(mode_height.saturating_sub(22)).max(1);let active_label_target_width = self.sidebar_text_width(&ui_font, self.right_sidebar_mode.label())?- .ceil() as usize;+ .ceil() as usize+ + MODE_LABEL_CLIP_SLOP;let inactive_segment_min_width = (mode_icon_size + SIDEBAR_INSET * 4).max(70).min((content_width / modes.len()).max(1));