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.

Show build version in macOS About panel

RoversX5d3759818fba
diff --git a/window/src/os/macos/app.rs b/window/src/os/macos/app.rs
index 58d9097e..771d749a 100644
--- a/window/src/os/macos/app.rs
+++ b/window/src/os/macos/app.rs
@@ -20,7 +20,6 @@ const CLS_NAME: &str = "WezTermAppDelegate";
extern "C" {
static NSAboutPanelOptionApplicationName: id;
static NSAboutPanelOptionApplicationIcon: id;
- static NSAboutPanelOptionApplicationVersion: id;
static NSAboutPanelOptionVersion: id;
}
@@ -164,8 +163,12 @@ extern "C" fn thinkterm_order_front_standard_about_panel(
unsafe {
let app = NSApp();
let app_name = nsstring("ThinkTerm");
- let empty_app_version = nsstring("");
- let empty_build_version = nsstring("");
+ // The panel renders these as "Version {ApplicationVersion} ({Version})".
+ // ApplicationVersion is left to default from CFBundleShortVersionString
+ // so the marketing version has a single source; the parenthesised slot
+ // carries the build stamp, which is what makes a screenshot of this
+ // window enough to identify the exact commit a user is running.
+ let build_version = nsstring(config::wezterm_version());
let current_icon: id = msg_send![app, applicationIconImage];
let loaded_icon = if current_icon == nil {
thinkterm_icon_path().and_then(|path| load_thinkterm_icon(&path))
@@ -173,12 +176,8 @@ extern "C" fn thinkterm_order_front_standard_about_panel(
None
};
- let mut keys = vec![
- NSAboutPanelOptionApplicationName,
- NSAboutPanelOptionApplicationVersion,
- NSAboutPanelOptionVersion,
- ];
- let mut objects = vec![*app_name, *empty_app_version, *empty_build_version];
+ let mut keys = vec![NSAboutPanelOptionApplicationName, NSAboutPanelOptionVersion];
+ let mut objects = vec![*app_name, *build_version];
let app_icon = if current_icon != nil {
current_icon