From 5a53a4b84d9ffde99806972dc89fe1cfea8b8445 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..0e235294 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 of creating a new tab and setting the 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