Skip to content

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.

feat(gui): draw sidebar program icons larger, badge kept in the row

RoversXca846c68a00a
diff --git a/wezterm-gui/src/termwindow/ui/sidebar.rs b/wezterm-gui/src/termwindow/ui/sidebar.rs
index aa512116..d10fb49f 100644
--- a/wezterm-gui/src/termwindow/ui/sidebar.rs
+++ b/wezterm-gui/src/termwindow/ui/sidebar.rs
@@ -70,6 +70,9 @@ const SESSION_ACTION_ICON_INSET: usize = 12;
const SESSION_STATUS_DOT_SIZE: usize = 10;
/// The square a thread's mark sits in; the Agents panel and the hover
/// cards draw theirs at this size too.
+/// A thread's program icons against the row's height: about the size
+/// of a window tab's.
+const SIDEBAR_ICON_SCALE: f32 = 0.7;
pub(crate) const SESSION_STATUS_ICON_SIZE: usize = 20;
const SESSION_STATUS_ACTIVE_ICON_SIZE: usize = 26;
const SPACE_DISCONNECTED_COLOR: LinearRgba = LinearRgba::with_components(0.86, 0.45, 0.12, 1.0);
@@ -889,7 +892,7 @@ impl crate::TermWindow {
text_right = mark_x;
}
let icons = marks.icons(&session.id, session.is_materialized);
- let diameter = (row_height as f32 * 0.56).round();
+ let diameter = (row_height as f32 * SIDEBAR_ICON_SCALE).round();
let cy = y as f32 + row_height as f32 / 2.0;
let gl_state = self.render_state.as_ref().unwrap();
let ctx = DrawContext::new(gl_state, self.dimensions, &self.render_metrics);
diff --git a/wezterm-gui/src/thread_marks.rs b/wezterm-gui/src/thread_marks.rs
index 78da6ccb..eb1ba854 100644
--- a/wezterm-gui/src/thread_marks.rs
+++ b/wezterm-gui/src/thread_marks.rs
@@ -139,7 +139,7 @@ fn build(catalog: &Catalog) -> HashMap<String, Vec<ResolvedIcon>> {
/// `diameter` across; the trailing layout keeps none.
pub(crate) fn slot_width(layout: NativeThreadIcons, diameter: f32) -> f32 {
match layout {
- NativeThreadIcons::Badge => diameter * 1.25,
+ NativeThreadIcons::Badge => diameter * 1.33,
NativeThreadIcons::Coins => diameter * 1.35,
NativeThreadIcons::Cluster => diameter * 1.2,
NativeThreadIcons::Trailing => 0.0,
@@ -179,8 +179,9 @@ pub(crate) fn draw_slot(
NativeThreadIcons::Badge | NativeThreadIcons::Trailing => {
let y = cy - d / 2.0;
draw_icon(ctx, layers, first, x, y, d, style, true, 0.0)?;
+ // Out to the right rather than down, so it stays within the row.
let small = (d * 0.55).round();
- let (bx, by) = (x + d * 0.7, y + d * 0.65);
+ let (bx, by) = (x + d * 0.78, y + d * 0.55);
match icons.len() {
1 => {}
2 => draw_icon(ctx, layers, &icons[1], bx, by, small, style, true, gap)?,