From adbc88e03730d89278d3dbc6e4562ccaad1f1fcb Mon Sep 17 00:00:00 2001 From: Marcus Kazmierczak Date: Sat, 21 Mar 2026 08:09:26 -0700 Subject: [PATCH] Add AppleScript example creating new tab and set title Adds a section to docs that shows how to create a new tab and set the title using AppleScript. The set_tab_title as added in: https://github.com/ghostty-org/ghostty/pull/11373 --- docs/features/applescript.mdx | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/features/applescript.mdx b/docs/features/applescript.mdx index ed987e98..8d3d8ec3 100644 --- a/docs/features/applescript.mdx +++ b/docs/features/applescript.mdx @@ -215,6 +215,24 @@ tell application "Ghostty" end tell ``` +### Set Tab Titles + +Use `perform action` with `set_tab_title` to label tabs from a script. + +An example creating a new tab and setting title: + +```AppleScript +tell application "Ghostty" + set win to front window + set cfg to new surface configuration + + set t1 to new tab in win with configuration cfg + perform action "set_tab_title:Editor" on focused terminal of t1 + input text "nvim .\n" to focused terminal of t1 + +end tell +``` + ### Jump to a Terminal by Working Directory ```AppleScript