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(settings): draw the CloseX logo at the foot of About

RoversXdb2e69cccb4c
diff --git a/assets/icon/CloseX.svg b/assets/icon/CloseX.svg
new file mode 100644
index 00000000..d0cc8498
--- /dev/null
+++ b/assets/icon/CloseX.svg
@@ -0,0 +1,28 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="54 81 876 234" width="876" height="234">
+ <!-- The CloseX mark and wordmark, drawn as paths so no font is needed.
+ White on transparent: it is an alpha mask, tinted when drawn. -->
+ <defs>
+ <radialGradient id="hole" cx="170.5" cy="198" r="80.5" gradientUnits="userSpaceOnUse">
+ <stop offset="0.6273" stop-color="#fff" stop-opacity="0"/>
+ <stop offset="0.6894" stop-color="#fff" stop-opacity="0.008"/>
+ <stop offset="0.7516" stop-color="#fff" stop-opacity="0.047"/>
+ <stop offset="0.8012" stop-color="#fff" stop-opacity="0.118"/>
+ <stop offset="0.8509" stop-color="#fff" stop-opacity="0.22"/>
+ <stop offset="0.9006" stop-color="#fff" stop-opacity="0.345"/>
+ <stop offset="0.9503" stop-color="#fff" stop-opacity="0.463"/>
+ <stop offset="1" stop-color="#fff" stop-opacity="0.54"/>
+ </radialGradient>
+ </defs>
+ <!-- The ring, and the soft shade inside its hole. -->
+ <path fill="#fff" fill-rule="evenodd" d="M170.5 82.25A115.75 115.75 0 1 1 170.5 313.75A115.75 115.75 0 1 1 170.5 82.25ZM170.5 117.5A80.5 80.5 0 1 0 170.5 278.5A80.5 80.5 0 1 0 170.5 117.5Z"/>
+ <circle cx="170.5" cy="198" r="80.5" fill="url(#hole)"/>
+ <!-- "CloseX", one path per letter. -->
+ <g fill="#fff" fill-rule="evenodd">
+ <path d="M445.5 178.5C445.5 151.82 418.05 130 384.5 130C348.88 130 322 160.75 322 201.5C322 242.25 349.31 273 385.5 273C418.5 273 445.5 251.18 445.5 224.5L419.5 224.5C419.5 240.4 405.5 251 384.5 251C362.6 251 348 231.2 348 201.5C348 172.4 362.6 153 384.5 153C405.5 153 419.5 163.2 419.5 178.5Z"/>
+ <path d="M460 132H484V271H460Z"/>
+ <path d="M548 165C577 165 598 187.68 598 219C598 250.32 577 273 548 273C519 273 498 250.32 498 219C498 187.68 519 165 548 165ZM548 185C532.5 185 523 198.11 523 219.5C523 240.89 532.5 254 548 254C563.5 254 573 240.89 573 219.5C573 198.11 563.5 185 548 185Z"/>
+ <path d="M802 226.5L802 219C802 187.68 781.63 165 753.5 165C725.08 165 704.5 187.68 704.5 219C704.5 250.32 725.71 273 755 273C778 273 795 260 801.5 243.5L777 241.5C772 250 764 254.5 754 254.5C740 254.5 729.5 245 729.5 226.5ZM729.5 208.5L777.5 208.5C777.5 195 767 185 753.5 185C740 185 729.5 195 729.5 208.5Z"/>
+ <path d="M694.5 193.5C694.5 177.82 675.15 165 651.5 165C628.26 165 610 179.08 610 197C610 212 618 222 640 226.5C662 231 671.5 234 671.5 243C671.5 250 664 255 652 255C640 255 632 250 630.5 241L606.5 243.5C608 262 626 273 651.5 273C676.7 273 696.5 258.04 696.5 239C696.5 221 684 214 662 209.5C642 205.5 634 203 634 195.5C634 189 641 184.5 652 184.5C662 184.5 669 189 671 197Z"/>
+ <path d="M808.5 132L838.5 132L868.5 181.5L898.5 132L928.5 132L884 201.5L929.5 271L899 271L868.5 221.5L838 271L808 271L852.5 201.5Z"/>
+ </g>
+</svg>
diff --git a/wezterm-gui/src/glyphcache.rs b/wezterm-gui/src/glyphcache.rs
index 6e8d1c1f..981c6123 100644
--- a/wezterm-gui/src/glyphcache.rs
+++ b/wezterm-gui/src/glyphcache.rs
@@ -637,6 +637,8 @@ pub struct GlyphCache {
/// The application icon, keyed by pixel size. One raster decode per
/// size, reused for the life of the cache.
pub app_icons: HashMap<u16, Sprite>,
+ /// The CloseX logo on About, keyed by pixel height, like `app_icons`.
+ pub closex_logos: HashMap<u16, Sprite>,
pub material_icons: HashMap<SizedMaterialIconKey, Sprite>,
pub cursor_glyphs: HashMap<(Option<CursorShape>, u8), Sprite>,
pub color: HashMap<(RgbColor, NotNan<f32>), Sprite>,
@@ -718,6 +720,7 @@ impl GlyphCache {
svg_icons: HashMap::new(),
brand_icons: HashMap::new(),
app_icons: HashMap::new(),
+ closex_logos: HashMap::new(),
material_icons: HashMap::new(),
rotated_svg_icons: HashMap::new(),
shadows: HashMap::new(),
@@ -755,6 +758,7 @@ impl GlyphCache {
svg_icons: HashMap::new(),
brand_icons: HashMap::new(),
app_icons: HashMap::new(),
+ closex_logos: HashMap::new(),
material_icons: HashMap::new(),
rotated_svg_icons: HashMap::new(),
shadows: HashMap::new(),
@@ -1462,6 +1466,19 @@ impl GlyphCache {
Ok(sprite)
}
+ pub fn cached_closex_logo(&mut self, height: usize) -> anyhow::Result<Sprite> {
+ let height = height.max(1).min(u16::MAX as usize);
+ let key = height as u16;
+ if let Some(sprite) = self.closex_logos.get(&key) {
+ return Ok(sprite.clone());
+ }
+
+ let image = crate::termwindow::ui::icons::rasterize_closex_logo(height)?;
+ let sprite = self.atlas.allocate(&image)?;
+ self.closex_logos.insert(key, sprite.clone());
+ Ok(sprite)
+ }
+
pub fn cached_material_icon(
&mut self,
icon: MaterialIcon,
diff --git a/wezterm-gui/src/settings_window.rs b/wezterm-gui/src/settings_window.rs
index 15dd9a70..7702048d 100644
--- a/wezterm-gui/src/settings_window.rs
+++ b/wezterm-gui/src/settings_window.rs
@@ -60,6 +60,14 @@ const SIDEBAR_BRAND_FONT_SIZE: f64 = if cfg!(target_os = "macos") {
12.75
};
const SIDEBAR_BRAND_FONT_WEIGHT: u16 = 750;
+// The copyright beside the About page's logo. A fixed size rather than the
+// settings font size: it belongs with the logo, which does not follow it.
+const LOGO_CAPTION_FONT_SIZE: f64 = if cfg!(target_os = "macos") {
+ 11.0
+} else {
+ 8.25
+};
+const LOGO_CAPTION_FONT_WEIGHT: u16 = 500;
const CONTROL_HEIGHT: f32 = 56.0;
const CONTROL_RADIUS: f32 = 14.0;
const HERO_PADDING: f32 = 36.0;
@@ -2219,6 +2227,7 @@ struct SettingsWindow {
body_font: Rc<LoadedFont>,
title_font: Rc<LoadedFont>,
sidebar_title_font: Rc<LoadedFont>,
+ logo_caption_font: Rc<LoadedFont>,
metrics: RenderMetrics,
render_state: Option<RenderState>,
webgpu: Option<Rc<WebGpuState>>,
@@ -2297,6 +2306,10 @@ impl SettingsWindow {
settings_font_size,
settings_body_font_weight(settings_font_weight),
)?;
+ let logo_caption_font = fonts.command_palette_font_with_size_and_weight(
+ LOGO_CAPTION_FONT_SIZE,
+ LOGO_CAPTION_FONT_WEIGHT,
+ )?;
let metrics = RenderMetrics::with_font_metrics(&ui_font.metrics());
let appearance = Connection::get()
.map(|conn| conn.get_appearance())
@@ -2361,6 +2374,7 @@ impl SettingsWindow {
body_font,
title_font,
sidebar_title_font,
+ logo_caption_font,
metrics,
render_state: None,
webgpu: None,
@@ -3676,6 +3690,10 @@ impl SettingsWindow {
settings_font_size,
settings_body_font_weight(settings_font_weight),
)?;
+ self.logo_caption_font = self.fonts.command_palette_font_with_size_and_weight(
+ LOGO_CAPTION_FONT_SIZE,
+ LOGO_CAPTION_FONT_WEIGHT,
+ )?;
self.metrics = RenderMetrics::with_font_metrics(&self.ui_font.metrics());
self.invalidate_shaped_text();
Ok(())
@@ -9063,6 +9081,46 @@ impl SettingsWindow {
Ok(())
}
+ /// The CloseX logo, `height` tall with its left edge at `x`, tinted like
+ /// an SVG icon so it reads black on light and white on dark. Returns the
+ /// width it took.
+ fn draw_closex_logo(
+ &self,
+ layers: &mut TripleLayerQuadAllocator<'_>,
+ x: f32,
+ y: f32,
+ height: f32,
+ color: LinearRgba,
+ ) -> anyhow::Result<f32> {
+ if height <= 0.0 {
+ return Ok(0.0);
+ }
+ let render_state = self.render_state.as_ref().unwrap();
+ let sprite = render_state
+ .glyph_cache
+ .borrow_mut()
+ .cached_closex_logo(height.round() as usize)?;
+ let width = sprite.coords.size.width as f32;
+ let height = sprite.coords.size.height as f32;
+ let x = x.round();
+ let mut quad = layers.allocate(2)?;
+ let left_offset = self.dimensions.pixel_width as f32 / 2.0;
+ let top_offset = self.dimensions.pixel_height as f32 / 2.0;
+ quad.set_position(
+ x - left_offset,
+ y - top_offset,
+ x + width - left_offset,
+ y + height - top_offset,
+ );
+ quad.set_texture(sprite.texture_coords());
+ quad.set_fg_color(color);
+ quad.set_alt_color_and_mix_value(color, 0.0);
+ quad.set_hsv(None);
+ quad.set_has_color(false);
+ quad.set_grayscale();
+ Ok(width)
+ }
+
/// A wrapping row of pill buttons, the way LaunchNext and macOS put a
/// page's outbound links along the bottom instead of one per row.
/// Returns the height it consumed.
@@ -9794,9 +9852,43 @@ impl SettingsWindow {
let button_y = card_y + card_height + gap;
let button_height = self.paint_button_row(layers, x, button_y, max_width, &buttons)?;
+ // Who makes it, held to the foot of the window. Its margin is tighter
+ // than the page's usual one, so the extent uses the same margin: with
+ // the usual one a pinned logo would leave a few pixels to scroll.
+ let logo_height = self.ui_px(64.0);
+ let logo_margin = self.ui_px(44.0);
+ let logo_top = (button_y + scroll + button_height + self.ui_px(48.0))
+ .max(self.content_bottom() - logo_margin - logo_height)
+ .round();
+ let logo_width = self.draw_closex_logo(
+ layers,
+ x,
+ logo_top - scroll,
+ logo_height,
+ self.palette().text,
+ )?;
+ // The copyright just after it, small and sitting on the wordmark's
+ // baseline. `draw_text` puts a baseline this far below the y it is
+ // given, whatever the font.
+ let caption_font = Rc::clone(&self.logo_caption_font);
+ let caption_x = x + logo_width + self.ui_px(12.0);
+ let baseline =
+ logo_top - scroll + logo_height * crate::termwindow::ui::icons::CLOSEX_LOGO_BASELINE;
+ let baseline_offset =
+ self.metrics.cell_size.height as f32 + self.metrics.descender.get() as f32;
+ self.draw_text(
+ layers,
+ &caption_font,
+ caption_x,
+ (baseline - baseline_offset).round(),
+ "© 2026",
+ self.palette().muted_text,
+ (x + max_width - caption_x).max(0.0),
+ )?;
+
self.ui.content_scroll.set_extents(
self.content_viewport_extent(),
- self.settings_content_extent(button_y + scroll + button_height),
+ (logo_top + logo_height + logo_margin).max(self.content_bottom()),
);
Ok(())
}
diff --git a/wezterm-gui/src/termwindow/ui/icons.rs b/wezterm-gui/src/termwindow/ui/icons.rs
index 1b530424..6522f09e 100644
--- a/wezterm-gui/src/termwindow/ui/icons.rs
+++ b/wezterm-gui/src/termwindow/ui/icons.rs
@@ -592,6 +592,31 @@ pub fn rasterize_app_icon(size: usize) -> Result<Image> {
Ok(Image::from_raw(size, size, data))
}
+/// How far down the CloseX logo its wordmark's baseline sits, as a fraction
+/// of the logo's height: 190 of the SVG's 234 units.
+pub const CLOSEX_LOGO_BASELINE: f32 = 190.0 / 234.0;
+
+/// The CloseX logo at the foot of the About page, `height` pixels tall and as
+/// wide as its proportions make it. White on transparent like the Lucide set,
+/// so it is drawn as a tinted mask and follows the theme.
+pub fn rasterize_closex_logo(height: usize) -> Result<Image> {
+ let svg = include_bytes!("../../../../assets/icon/CloseX.svg");
+ let tree = resvg::usvg::Tree::from_data(svg, &resvg::usvg::Options::default())
+ .context("parsing the CloseX logo")?;
+ let svg_size = tree.size();
+ let height = height.max(1);
+ let scale = height as f32 / svg_size.height();
+ let width = ((svg_size.width() * scale).round() as usize).max(1);
+ let mut pixmap = resvg::tiny_skia::Pixmap::new(width as u32, height as u32)
+ .with_context(|| format!("allocating {width}x{height}px logo pixmap"))?;
+ resvg::render(
+ &tree,
+ resvg::tiny_skia::Transform::from_scale(scale, scale),
+ &mut pixmap.as_mut(),
+ );
+ Ok(Image::from_raw(width, height, pixmap.take()))
+}
+
fn rasterize_svg_str(svg: &str, size: usize, degrees: f32) -> Result<Image> {
let size = size.max(1);
let tree = resvg::usvg::Tree::from_data(svg.as_bytes(), &resvg::usvg::Options::default())
@@ -771,4 +796,15 @@ mod tests {
assert_eq!(data.len(), 24 * 24 * 4);
assert!(data.iter().any(|value| *value != 0));
}
+
+ #[test]
+ fn closex_logo_rasterizes_at_its_proportions() {
+ use window::BitmapImage;
+ let image = super::rasterize_closex_logo(32).unwrap();
+ let (width, height) = image.image_dimensions();
+ assert_eq!(height, 32);
+ assert_eq!(width, 120);
+ let data: Vec<u8> = image.into();
+ assert!(data.iter().any(|value| *value != 0));
+ }
}